cangjie-json

Encode and decode JSON in Cangjie using stdx.encoding.json.

2|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/zhenzhizhi12/NexusAgent --skill cangjie-json-zhenzhizhi12
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cangjie-json
Source: https://github.com/zhenzhizhi12/NexusAgent/tree/main/.opencode/skills/common-skill-l1/json
Command: npx skills add https://github.com/zhenzhizhi12/NexusAgent --skill cangjie-json-zhenzhizhi12

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

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.

Frequently Asked Questions about cangjie-json

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I parse JSON strings into structured data in Cangjie?

To parse JSON strings in Cangjie, you can convert them into a type-safe `JsonValue` hierarchy, which allows you to programmatically access and manipulate JSON objects, arrays, strings, numbers, booleans, and nulls.

What is the best way to serialize custom data types to JSON streams in Cangjie?

The best way to serialize custom data types in Cangjie is by implementing `JsonSerializable` and `JsonDeserializable` interfaces, enabling efficient stream-based serialization and deserialization via `JsonWriter` and `JsonReader`.

Does Cangjie support stream-based JSON processing for large datasets?

Yes, Cangjie supports stream-based JSON processing using `JsonWriter` and `JsonReader` to efficiently serialize and deserialize custom types, which is ideal for handling large datasets or complex objects.

Can I customize JSON output formatting in Cangjie for compact or pretty-printed results?

Yes, you can customize JSON output formatting in Cangjie using `WriteConfig`, which provides options to generate either compact or pretty-printed JSON formats based on your application requirements.

How do I construct JSON payloads for web API requests using Cangjie?

You can construct JSON payloads for web API requests in Cangjie by building JSON structures programmatically with the `JsonValue` type system, allowing you to easily create outgoing JSON objects and arrays.

Do I need external dependencies to handle JSON encoding and decoding in Cangjie?

No external dependencies are required, as this functionality leverages the `stdx.encoding.json` library within Cangjie to provide robust JSON encoding and decoding capabilities natively.