Skip to main content
Create a readable handle for JSON data from a URI or static text. This operation is useful when there is a need to read static JSON data, JSON data from a public URI, or JSON data from the output from another operation.

Required Parameters

  • None

Optional Parameters

  • uri: A JSON file URI (for example http://mydomain.com/resources/somedata.json or /tmp/myfile.json).
  • text: JSON text. This can be static JSON that is set on an ArcScript attribute, or the output from a previous operation in the script (such as the [http:content] output attribute of one of the http operations.) See the example below.

Output Attributes

  • handle: A readable handle reference to the JSON data. This handle can be used by subsequent operations (see the example below).
  • warning#: The warning array of the readable JSON handle.

Example

Here is an example that uses jsonOpen to create a handle for some static JSON text and then pass that handle to another operation (in this case, the second operation is jsonDOMGet):
When you use jsonOpen, make sure to use the corresponding jsonClose operation to close the handle at the end of the script to avoid leaking memory through open handles.

Additional Resources

The following article is a real-world use case that uses the jsonOpen operation: