What problem does it solve?
This Skill provides comprehensive capabilities for parsing, building, and streaming JSON data within the Cangjie programming language, simplifying data interchange and serialization tasks.
Core Features & Use Cases
- JSON Value Handling: Work with JSON objects, arrays, strings, numbers, booleans, and nulls using a type-safe system.
- String Parsing & Building: Convert JSON strings to
JsonValue and construct JSON structures programmatically.
- Stream Processing: Efficiently serialize and deserialize custom types to/from JSON streams, ideal for large datasets or complex objects.
- Custom Type Serialization/Deserialization: Implement
JsonSerializable and JsonDeserializable for seamless integration of your own data structures with JSON.
- Formatting Control: Customize JSON output with options for compact or pretty-printed formats.
- Use Case: When developing a Cangjie application that communicates with a web API, use this Skill to easily parse the incoming JSON responses and construct JSON payloads for outgoing requests.
Quick Start
Use the cangjie-json skill to parse the JSON string {"name": "Alice", "age": 30} into a JsonValue object.