json_string library

A simple and lightweight JSON data container for Dart and Flutter.

Classes

JsonString
A single piece of JSON data.

Mixins

Jsonable
An object that can be encoded into some valid JSON.

Typedefs

JsonObjectDecoder<T> = T Function(Map<String, dynamic> json)
Transforms a JSON object representation (Map<String, dynamic>) into a Dart object.
JsonObjectEncoder<T> = Map<String, dynamic>? Function(T dartObject)
Transforms a Dart object into a JSON object representation (Map<String, dynamic>).
JsonObjectNullableDecoder<T> = T Function(Map<String, dynamic>? json)
Transforms a nullable JSON object representation (Map<String, dynamic>?) into a Dart object.

Exceptions / Errors

JsonDecodingError
Error thrown during a JSON decoding operation.
JsonEncodingError
Error thrown during a JSON encoding operation.
JsonFormatException
Exception thrown when a string does not have the expected JSON format and cannot be parsed.