Skip to main content

Home/ Computer Science Knowledge Sharing/ Group items tagged JSON-RPC

Rss Feed Group items tagged

Islam TeCNo

specification - JSON-RPC - Trac - 0 views

  • 3. JSON Class hinting ΒΆ There are only simple data types defined in JSON. To overcome this problem in a JSON compatible way a special property for objects is introduced. {"__jsonclass__":["constructor", [param1,...]], "prop1": ...} The object is then instantiated using the constructor, passing in the parameters. Once constructed the properties (prop1, ...) will be applied.
    • Islam TeCNo
       
      JSON-RPC el mafroud feh data type wa7ed bas ....bas ana mesh fahem el 7eta deh awi !!
  • To give the serverside peer a chance to send messages to the client side peer, the client side peer may reopen communication by sending an empty HTTP POST.
    • Islam TeCNo
       
      mesh fahem el 7eta deh !! eh lazmet el empty post ya3ni !
  • --> {"method": "postMessage", "params": ["Hello all!"], "id": 99} <-- {"result": 1, "error": null, "id": 99} <-- {"method": "handleMessage", "params": ["user1", "we were just talking"], "id": null} <-- {"method": "handleMessage", "params": ["user3", "sorry, gotta go now, ttyl"], "id": null} --> {"method": "postMessage", "params": ["I have a question:"], "id": 101} <-- {"method": "userLeft", "params": ["user3"], "id": null} <-- {"result": 1, "error": null, "id": 101}
  •  
    JSON-RPC is lightweight remote procedure call protocol similar to XML-RPC. It's designed to be simple!
1 - 1 of 1
Showing 20 items per page