toon_core library

Classes

BigIntToonConverter
Converter for BigInt objects in TOON format
BooleanToonConverter
Boolean converter
DateTimeToonConverter
Converter for DateTime objects in TOON format
DurationToonConverter
Converter for Duration objects in TOON format
NullToonConverter
Null converter
NumberToonConverter
Number converter for int and double
StringToonConverter
Simple string converter (pass-through for strings)
StringUtils
Utility functions for string processing in TOON format
Toon
Convenience class that provides static methods for TOON operations
ToonCodec
Codec for TOON (Token-Oriented Object Notation) format
ToonConverter<T>
Abstract base class for TOON type converters
ToonConverterRegistry
Registry for managing TOON converters
ToonDecoder
TOON decoder that parses TOON string format to Dart objects
ToonEncoder
TOON encoder that converts Dart objects to TOON string format
ToonErrors
Utility class for creating common TOON errors
ToonField
Annotation to customize how a field is serialized in TOON format
ToonOptions
Configuration options for TOON encoding and decoding
ToonSerializable
Annotation to mark classes for TOON code generation
ToonStream
Stream-based TOON processor for handling large datasets
ToonUtils
Utility functions for TOON processing
ToonValidator
Comprehensive TOON format validator
UriToonConverter
Converter for Uri objects in TOON format
ValidationResult
Result of a validation operation
ValidationUtils
Utility functions for validating TOON format and data

Enums

ToonArrayStrategy
TOON array encoding strategies
ToonDelimiter
TOON delimiter types
ToonErrorSeverity
Error severity levels
ToonKeyFolding
Key folding strategies for TOON encoding
ToonValidationLevel
Validation levels for TOON parsing

Constants

kDefaultDelimiter → const String
Default delimiter for TOON arrays
kDefaultEncoding → const String
Default encoding for TOON strings
kDefaultIndent → const int
Default indentation for TOON format (2 spaces)
kEscapeSequences → const Map<String, String>
Escape sequences allowed in TOON
kLineEnding → const String
TOON line ending (always LF as per spec)
kMaxDepth → const int
Maximum depth for nested objects to prevent infinite recursion
kStructuralChars → const Set<String>
Characters that require quoting in TOON format
kToonVersion → const String
TOON format version
kUnescapeSequences → const Map<String, String>
Reverse mapping for unescape sequences
toonCodec → const ToonCodec
Global TOON codec instance for convenience

Properties

globalToonConverterRegistry ToonConverterRegistry
Global converter registry instance
final
toon ToonCodec
Global TOON codec instance for convenience
final

Functions

toonDecode(String source, {ToonOptions? options}) → dynamic
Convenience function to decode TOON format to Dart objects
toonEncode(Object? object, {ToonOptions? options}) String
Convenience function to encode data to TOON format

Exceptions / Errors

ToonArrayLengthError
Error that occurs when array lengths don't match
ToonConversionError
Error that occurs when conversion between types fails
ToonDecodingError
Error that occurs during TOON decoding/parsing
ToonEncodingError
Error that occurs during TOON encoding
ToonError
Base class for all TOON-related errors
ToonIndentationError
Error that occurs when indentation is invalid
ToonStructureError
Error that occurs when TOON structure is invalid
ToonSyntaxError
Error that occurs due to syntax issues in TOON format
ToonValidationError
Error that occurs during TOON validation