Monday, 26 September 2016

JSON sounds foreign to me.

JSON sounds foreign to me.

How I skin this cat JSON using classes (objects in object oriented term). Before you can send JSON rpc call (this is the protocol used by JSON as different from SOAP in the  old API 6.0) you have to  create classes for the request where Json picks the values for your params and filters assembling (serialization) and then send the request to Berfair servers. The server will send back the response and Json will fill the response(deserialization) classes for you to fill your datagridview. You can not fill your datagridview directly, you have to bind the response to a dataset and datatable and then fill the datagridview from the response classes.  How do you know what classes to create ? for request use the Betfair Visualiser select any of the listed requests and cut a paste the value returned to Json Parser and study the tree like hierarchy. From there you can create response classes that you need. For traders learning how to program VB Json rpc method is understandable and easier to follow. See it's not that hard. That's how I' skinned this cat Json.



No comments:

Post a Comment