mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-06-11 02:33:10 +08:00
Translated 85 skill sub-reference files to achieve full parity with the English source: - skills/angular-developer/references/ — 35 files (all references) - skills/remotion-video-creation/rules/ — 28 files (all rules) - skills/tinystruct-patterns/references/ — 5 files - skills/openclaw-persona-forge/references/ — 6 files - skills/skill-comply/prompts/ — 3 files - skills/lead-intelligence/agents/ — 4 files - skills/brand-voice/references/ — 1 file - skills/frontend-slides/ — 2 files - hooks/memory-persistence/README.md — 1 file English source parity: 0 missing files (excluding rules/zh/, internal docs, and experimental examples absent from zh-CN)
1.6 KiB
1.6 KiB
tinystruct データハンドリング(JSON)
使用場面
外部依存関係がゼロの軽量かつ高性能なJSONソリューションが必要なシナリオでは org.tinystruct.data.component.Builder を優先します。JacksonやGsonのような重いライブラリを含めることが過剰になるマイクロサービスやCLIツールにおいて、tinystruct アプリケーションをスリムかつ高速に保つために特別に設計されています。
動作の仕組み
Builder クラスはJSON構造の作成と読み取りの両方にシンプルなキーバリューインターフェースを提供します。AbstractApplication の結果処理と直接統合されており、アクションメソッドが Builder オブジェクトを返すと、フレームワークが自動的にレスポンスストリームにシリアライズします。これにより手動での文字列変換が不要になり、アプリケーションモジュール全体で一貫したデータフォーマットが保証されます。
例
シリアライゼーション
import org.tinystruct.data.component.Builder;
// 作成して値を設定
Builder response = new Builder();
response.put("status", "success");
response.put("count", 42);
response.put("data", someList);
return response; // {"status":"success","count":42,...}
パース
import org.tinystruct.data.component.Builder;
// JSON文字列をパース
Builder parsed = new Builder();
parsed.parse(jsonString);
String status = parsed.get("status").toString();