Class OdfJsonSerializerOptions
Provides the OdfJsonSerializerOptions API. 提供專案共用的 JsonSerializerOptions 預設組態。
public static class OdfJsonSerializerOptions
- Inheritance
-
OdfJsonSerializerOptions
- Inherited Members
Remarks
JsonSerializer 預設編碼器會將非 ASCII 字元(含中文)跳脫為 \uXXXX,
不利於終端機與人工閱讀。本類別統一採用 UnsafeRelaxedJsonEscaping,
保留 UTF-8 字面量,並僅跳脫 JSON 語法所需字元。
程式庫 ToJson() 使用手寫序列化以維持穩定欄位順序,
其 EscapeJson 語意與本類別之編碼器策略一致。
Properties
Compact
Gets the Compact value. 供測試或機器消費使用的單行 JSON 組態。
public static JsonSerializerOptions Compact { get; }
Property Value
HumanReadable
Gets the HumanReadable value. 供 CLI 與人工閱讀使用的縮排 JSON 組態。
public static JsonSerializerOptions HumanReadable { get; }
Property Value
Manifest
Gets the Manifest value. 供 corpus manifest 等檔案持久化使用的組態(camelCase 屬性名稱 + 縮排)。
public static JsonSerializerOptions Manifest { get; }