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 on 14 Jun 09JSON-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.
-
--> {"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}