The following objects are provided to exchange data in JSON and consume the RESTful web services:
-
HTTPClient object -- a base object for sending HTTP requests and receiving HTTP responses from a resource identified by a URI. Compared to the Inet object, the HTTPClient object is easier to use and supports more methods (Get/Post/Put/Delete) and more SSL protocols. For more about this object, refer to the section called “HTTPClient object” in Objects and Controls.
-
JSONGenerator object -- provides the ability to construct the JSON objects with the root item being either an object or an array. It supports adding values, objects, or arrays to the constructed JSON object. For more about this object, refer to the section called “JSONGenerator object” in Objects and Controls.
-
JSONParser object -- provides the ability to load the JSON-formatted data from a string or from a TXT file into a JSON object. For more about this object, refer to the section called “JSONParser object” in Objects and Controls.
-
RESTClient object -- provides the ability to access the RESTful Web APIs. It loads the JSON-formatted string returned from the RESTful Web APIs into the DataWindow object. For more about this object, refer to the section called “RESTClient object” in Objects and Controls.
Note that these four objects cannot be referenced in .NET Web Service and .NET Assembly components, otherwise the component will fail to be deployed.