Page History
...
It is important to understand that the GetObject service returns a handle to a JSON object. This is useful because it can be shared with other services (referred to as companion services) that use a handle to update a resource object. The AddProperty service will be used to add a simple name/value pair to the resource object . Here is a sample code snippetlike so:
Code Block | ||
---|---|---|
| ||
objResource = HTTP_Resource_Services('GetObject') If Error_Services('NoError') then HTTP_Resource_Services('AddProperty', objResource, 'firstName', 'William') HTTP_Resource_Services('AddProperty', objResource, 'lastName', 'Hudson') // Serialize the JSON object. jsonResource = HTTP_Resource_Services('GetSerializedResource', objResource) end |
...