Node: JSON Mapper

From Waltz
Jump to navigation Jump to search

The JSON Mapper node allows you to ingest a String of JSON-formatted data and convert it to native types in Waltz like a Map or List based on the provided JSON's structure. JSON is a standard way to communicate blobs of data, and this node allows you to convert the plain-text JSON into usable objects in Waltz where you can query specific properties.

To reverse the effect of this node, use a JSON Stringify node.

Settings

Expected Type Details Default
input String The plain-text JSON to be ingested. "{ \"bestNumber\": 42, \"bestFriend\": \"Dog\", \"offices\": [\"SOJ\", \"NYC\", \"SF\"] }"

Parameters

Type Details
output Map<Any> Note: The parameter is read-only. A map constructed from the provided input.

Functions

There are no functions exposed by this node.

Example Usage

JSON and how is behaves is generally well documented. Given the following JSON data…

{
    "bestNumber": 42,
    "bestFriend": "Dog",
    "offices": [
        "SOJ",
        "NYC",
        "SF"
    ]
}

…we can expect Waltz to generate the following Map of data…

Key Value Value Type
bestNumber 42 Number
bestFriend Dog String
offices SOJ NYC SF List<String>
Nodes
Devices ArtNet Input · ArtNet Output · Interactive LED Processor · NDI™ Input · NDI™ Output · OSC Input · OSC Output · Projector · SensorLink · TCP · TUIO Output · UDP Input · UDP Output · Watchout Media Server
Objects LED Tile Layout · List · Map · Random Number · Simulated Touch · Timer · Value · Wave
Operators Blend · Change · Clip · Cluster Tracker · DMX Multiverse Merge · Ease · Filter · Hold · JSON Mapper · JSON Stringify · Logic · Math · Proximity · Range · Rotate · Scale · Shear · Smooth · Touch Mapper · Translate
Scenes External Scene · Material Scene
Materials Graph · Touch Material
Scripting Script Function · Script
Comments Comment