/usr/lib/swipl/library/ext/json/json_convert.pl
All Application Manual Name SummaryHelp

  • ext
    • json
      • json.pl -- Reading and writing JSON serialization
      • json_grammar.pl
      • json_rpc_common.pl
      • json_rpc_server.pl
      • json_schema.pl
      • json_convert.pl -- Convert between JSON terms and Prolog application terms
        • current_json_object/3
        • json_object/1
        • prolog_bool_to_json/2
        • prolog_to_json/2
        • json_to_prolog/2
      • json_rpc_client.pl -- JSON RPC client
 json_to_prolog(+JSON, -Term) is det
Translate a JSON term into an application term. This transformation is based on :- json_object/1 declarations. An efficient transformation is non-trivial, but we rely on the assumption that, although the order of fields in JSON terms is irrelevant and can therefore vary a lot, practical applications will normally generate the JSON objects in a consistent order.

If a field in a json_object is declared of type boolean, @true and @false are translated to true or false, the most commonly used Prolog representation for truth-values.