Useful JSON API methods
The following table lists and describes some useful JSON API methods and properties.
|
Class |
Method or property |
Arguments |
Description |
|---|---|---|---|
|
|
|
Not applicable |
The getter for this property:
For example:
|
|
|
|
|
Parses JSON data as a
|
|
|
|
Get JSON data from a File object and convert it to the structural type. To use
natural Gosu syntax for properties of the result, assign the result to a variable of type
|
|
|
|
|
Gets JSON data from a URL and convert it to the structural type. One method signature takes a URL as a
|
|
|
|
|
No arguments |
Converts an instance of the structural type to Gosu code that creates that instance. The return value is a String object containing Gosu code. Escaped Unicode characters in the structural type remain unchanged in the Gosu code. |
|
|
No arguments |
Converts an instance of the structural type to JSON. The return value is a String object containing JSON data. Escaped Unicode characters in the structural type remain unchanged in the JSON data. |
|
|
|
No arguments |
Converts an instance of the structural type to XML. The return value is a String object containing XML data. Escaped Unicode characters in the structural type are converted to unescaped Unicode characters in the XML data. |
