asun library

ASUN (Array-Schema Unified Notation) — high-performance codec for Dart.

Zero-copy binary format, schema-driven text format. Designed for extreme performance with no intermediate conversions.

Classes

AsunSchema
Schema descriptor for ASUN struct serialization.
AsunType
Type annotations for ASUN schema.

Functions

decode(String input) → dynamic
Decode an ASUN text string into a structured Dart value.
decodeBinary(Uint8List data, {List<String>? fields}) → dynamic
Decode ASUN binary bytes into structured Dart value.
decodeBinaryListWith<T>(Uint8List data, List<String> fields, List<_FieldType> types, T factory(Map<String, dynamic>)) → List<T>
Decode a list of structs from ASUN binary.
decodeBinaryWith<T>(Uint8List data, List<String> fields, List<_FieldType> types, T factory(Map<String, dynamic>)) → T
Decode ASUN binary into typed object using factory.
decodeListWith<T>(String input, T factory(Map<String, dynamic>)) → List<T>
Decode ASUN text into a list of typed objects.
decodeWith<T>(String input, T factory(Map<String, dynamic>)) → T
Decode ASUN text into a typed object using a field-bag factory function.
encode(dynamic value) → String
Encode a value to compact ASUN string (unannotated schema).
encodeBinary(dynamic value) → Uint8List
Encode a value to ASUN binary format.
encodePretty(dynamic value) → String
Encode a value to pretty-formatted ASUN string (unannotated).
encodePrettyTyped(dynamic value) → String
Encode a value to pretty-formatted ASUN string with type annotations.
encodeTyped(dynamic value) → String
Encode a value to ASUN string with type-annotated schema.
prettyFormat(String src) → String
Reformat compact ASUN string with smart indentation.

Typedefs

FieldType = _FieldType

Exceptions / Errors

AsunError
ASUN error types.