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

  • ext
    • json
      • json.pl
      • json_grammar.pl -- JavaScript grammar
      • json_convert.pl
      • json_rpc_server.pl -- JSON RPC Server
      • json_rpc_client.pl -- JSON RPC client
        • json_call/4
        • json_notify/3
        • json_batch/5
        • json_full_duplex/2
      • json_schema.pl -- JSON Schema reader and validator
 json_batch(+Stream, +Notifications:list, +Calls:list, -Results:list, +Options) is det
Run a batch of notifications and normal calls on the JSON server at the other end of Stream. On success, Result is unified to a list with the same length as Calls. Each element either contains a value, similar to json_call/4 or a term error(Dict), where Dict holds the code, message and optional data field. Note that error(Dict) is not a valid JSON type and this is thus unambiguous. While the JSON RPC standard allows the server to process the messages in any order and allows for concurrent processing, all results are sent in one message and this client ensures the elements of the Results list are in the same order as the Calls list. If the Calls list is empty this predicate does not wait for a reply.