JSON
Parse, create, manipulate, and serialize JSON data structures for working with APIs, configuration files, and data interchange.
Overview
The JSON package provides comprehensive JSON handling capabilities. Use it when you need to parse JSON responses from APIs, create JSON payloads for requests, manipulate JSON objects, or read/write JSON files.
Key Features
- Parse & Serialize - Convert between JSON strings and objects
- Create & Modify - Build and update JSON structures
- Access Values - Get and set values by key or path
- File Operations - Read and write JSON files
- Object Utilities - Clone, get keys, delete properties
Available Nodes
- Decode - Parse JSON string into object
- Encode - Convert object to JSON string
- Create - Create a new empty JSON object
- Get - Get value by key or JSON path
- Set - Set value by key or JSON path
- Delete - Remove a property from JSON object
- Keys - Get all keys from JSON object
- Values - Get all values from JSON object
- Clone - Create a deep copy of JSON object
- Read - Read and parse JSON from file
- Write - Write JSON object to file
When to Use This Package
- API Integration: Parse API responses and create request bodies
- Configuration: Read and write JSON config files
- Data Transformation: Convert and restructure data
- Data Storage: Store structured data in JSON format
- Message Handling: Process JSON messages from queues
Typical Workflow
- Decode JSON string from API response
- Get specific values using keys or paths
- Set new values or modify existing ones
- Encode back to string for API requests
- Or Write to file for persistence
JSON Path Examples
Access nested data using dot notation:
user.name- Get name from user objectitems[0].price- Get price from first item in arraydata.results[*].id- Get all IDs from results array
Common Use Cases
- Extract specific fields from API responses
- Build complex nested objects for API requests
- Transform data between different JSON structures
- Merge multiple JSON objects
- Validate and clean JSON data
📄️ Clone
Robomotion.JSON.Clone
📄️ Create
Robomotion.JSON.Create
📄️ Decode
Robomotion.JSON.Decode
📄️ Delete Value
Robomotion.JSON.Delete
📄️ Encode
Robomotion.JSON.Encode
📄️ Get Value
Robomotion.JSON.Get
📄️ Get Keys
Robomotion.JSON.Keys
📄️ Read
Robomotion.JSON.Read
📄️ Set Value
Robomotion.JSON.Set
📄️ Get Values
Robomotion.JSON.Values
📄️ Write
Robomotion.JSON.Write