This page is a concise reference for the public surface most teams use when integrating DevOp.Toon.
ToonEncoderUse ToonEncoder for direct static encoding.
Key members:
Encode<T>(T data)Encode<T>(T data, ToonEncodeOptions options)EncodeToBytes<T>(T data)Json2Toon(string json)DefaultOptionsCurrent static defaults:
Indent = 2KeyFolding = SafeObjectArrayLayout = ColumnarDelimiter = COMMAToonDecoderUse ToonDecoder for direct static decoding and conversion.
Key members:
Decode(string toonString)Decode<T>(string toonString)Toon2Json(string toonString)DetectOptions(string toonString)DefaultOptionsIToonService and ToonServiceUse the service API when TOON should be configured once and reused across an application.
Key capabilities:
AddToon(...)Use AddToon(...) to register IToonService and shared ToonServiceOptions in DI.
ToonEncodeOptions controls output shape:
IndentDelimiterKeyFoldingFlattenDepthObjectArrayLayoutIgnoreNullOrEmptyExcludeEmptyArraysPractical guidance:
Columnar is the strongest current default story for real business dataIgnoreNullOrEmpty = true helps reduce low-value tabular columnsExcludeEmptyArrays = true removes empty array properties from outputToonDecodeOptions controls parser behavior:
IndentStrictExpandPathsObjectArrayLayoutPractical guidance:
Strict = true unless you have a specific compatibility reason not toExpandPaths = Safe only when dotted keys should become nested objectsToonNode for DOM-style accessToonMediaTypes.Application for application/toonToonMediaTypes.Text for text/toonStart with IToonService for applications and use the static APIs for local transforms, tests, utilities, or focused serialization tasks.