json_serializer library

This library provides JSON serialization and deserialization functionality.

Classes

CamelCaseConvention
CamelCase naming convention (e.g., firstName, lastName).
EnumType<T extends Enum>
Represents an enumeration type for JSON serialization.
JsonConverter<T>
Base class for all JSON converters.
JsonSerializer
A utility class that provides JSON serialization and deserialization functionality.
JsonSerializerOptions
Configuration options for the JSON serializer.
KebabCaseConvention
Kebab-case naming convention (e.g., first-name, last-name).
LowerCaseConvention
lowercase naming convention (e.g., firstname, lastname).
NamingConvention
This file contains the implementation of various naming conventions used in JSON serialization. Each convention is responsible for converting between different naming styles. The base class for all naming conventions.
PascalCaseConvention
PascalCase naming convention (e.g., FirstName, LastName).
Serializable
An abstract class that represents a serializable object.
SnakeCaseConvention
Snake_case naming convention (e.g., first_name, last_name).
UpperCaseConvention
UPPERCASE naming convention (e.g., FIRSTNAME, LASTNAME).
UserType<T>
Represents a user-defined type for JSON serialization.

Functions

deserialize<T>(String json, [JsonSerializerOptions? options]) → T
Deserializes the given JSON string to an object of type T.
serialize(Object? object, [JsonSerializerOptions? options]) String
Serializes the given object to a JSON string.

Exceptions / Errors

JsonSerializerException
Exception thrown when there is an error during JSON serialization or deserialization.