[det]term_to_json(+Term,
+Bindings, -JsonTerm)
- Variable:
{"type":"var", "name":<string>} - Atom:
{"type":"atom", "value":<string>} - Integer:
{"type":"integer", "value":<integer>} - Float:
{"type":"float", "value":<float>} - List: JSON array
- Dict: a JSON object. Values are processed recursively. (the tag is ignored)
json([Key=Value, ...]): a JSON object Values are processed recursively.- compound:
{"type":"compound", "functor":<string>, "args":<array>}
| Bindings | is a list of Name=Var terms for variables that get their name from the environment. |