Menu
Lumberyard
Legacy Reference

JSON Nodes

Flow Graph is deprecated and will be removed in a future version of Lumberyard. Learn about Script Canvas, Lumberyard's new visual scripting environment.

This topic references tools and features that are legacy. If you want to use legacy tools in Lumberyard Editor, disable the CryEntity Removal gem using the Project Configurator or the command line. To learn about the latest features, see the Amazon Lumberyard User Guide.

You can use these flow graph nodes to configure JSON settings.

GetJsonProperty node

Used to get the JSON attribute value.

Inputs

Port Type Description
Activate Any Triggers the node
JSON String The JSON code to parse
Attribute String The attribute to get the value of

Outputs

Port Type Description
Error String Triggers if the JSON could not be parsed or the attribute could not be found
OutValue String Outputs the attribute value

IsValueInJsonArray node

Used to look through a JSON array for the specified value.

Inputs

Port Type Description
Activate Any Triggers the node
JsonArray String The JSON array to search on
Value String The JSON value to search for

Outputs

Port Type Description
Result Integer Outputs the number of occurrences found
True Boolean Triggers if the value was found
False Boolean Triggers if the value was not found

IterateJsonArrayProperty node

Used to iterate through a JSON array, returning one element at a time.

Inputs

Port Type Description
Begin Any Starts iterating over the supplied JSON array
Continue Any Continues iterating over the supplied JSON array
JsonArray String The JSON array to iterated over

Outputs

Port Type Description
Value Float Value of the current array element
Index Integer Index of the current array element
Done Any Triggers when there are no more elements in the array
IsEmpty Boolean Triggers if the array is empty
Error String Triggers if an error occurs

SetJsonProperty node

Used to set a property on a JSON object.

Inputs

Port Type Description
In Any Activates the node
JsonObject String The JSON object to set the property on
Name String Name of the JSON property
Value String Value of the JSON property

Outputs

Port Type Description
Out String Outputs the JSON object