1.3 library(json_rpc_client): JSON RPC client
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog JSON library
        • Supporting JSON
          • library(json_rpc_client): JSON RPC client
            • json_call/4
            • json_notify/3
            • json_batch/5
            • json_full_duplex/2
Availability::- use_module(library(json_rpc_client)).(can be autoloaded)
Source[det]json_batch(+Stream, +Notifications:list, +Calls:list, -Results:list, +Options)
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.