What problem does it solve?
This Skill simplifies the process of working with JSON data directly within ObjectScript, eliminating the need for complex manual parsing and serialization.
Core Features & Use Cases
- Dynamic Entities: Use
%DynamicObject and %DynamicArray to represent JSON structures.
- JSON Constructors: Create dynamic entities using literal JSON syntax (
{} and []).
- Serialization/Deserialization: Convert between ObjectScript dynamic entities and canonical JSON strings using
%ToJSON() and %FromJSON().
- Dynamic Expressions: Embed ObjectScript expressions within JSON constructors for runtime evaluation.
- Method Chaining: Chain methods like
%Set(), %Push(), and %ToJSON() for concise operations.
- Iteration: Traverse dynamic entities using
%GetIterator() and %GetNext().
- Use Case: Easily parse an incoming JSON API response into an ObjectScript object for manipulation, or serialize an ObjectScript data structure into a JSON string for transmission.
Quick Start
Use the Using JSON skill to convert the following JSON string into a dynamic ObjectScript object: {"name":"example","value":123}.