JsonConverterImpl class

Implementation of the JsonConverter interface for safe type extraction and conversion from dynamic JSON data to strongly typed Dart objects.

Implemented types

Constructors

JsonConverterImpl()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

extractDateTime(dynamic value, String errMsg) DateTime
Parses a String into DateTime. Throws FormatException if value is not a valid date string.
override
extractDateTimeFromEpochMs(dynamic value, String errMsg) DateTime
Creates a DateTime from epoch milliseconds. Throws FormatException if value is not a number.
override
extractDoubleValue(dynamic value, String errMsg) double
Extracts and validates a double value. Throws FormatException if value is not a number or not a double.
override
extractIntValue(dynamic value, String errMsg) int
Extracts and validates an int value. Throws FormatException if value is not a number or not an int.
override
extractJsonObject(Map data, String errMsg) Map<String, dynamic>
Converts a Map with dynamic keys to a Map with String keys. Throws FormatException if any key is not a String.
override
extractJsonObjectWithListOfJsonObjects(dynamic value, String errMsg) Map<String, List<Map<String, dynamic>>>
Extracts a nested structure: a Map with String keys and values as Lists of JSON objects. Validates all levels of the structure.
override
extractList(dynamic value, String errMsg) List
Extracts and validates a List from dynamic value. Throws FormatException if value is not a List.
override
extractListOfJsonObjects(dynamic value, String errMsg) List<Map<String, dynamic>>
Extracts a List of JSON objects (Map<String, dynamic>from dynamic value. Validates both the list structure and that all elements are properly formatted. Throws FormatException for invalid types.
override
extractMap(dynamic value, String errMsg) Map
Extracts and validates a Map from dynamic value. Throws FormatException if value is not a Map.
override
extractStringValue(dynamic value, String errMsg) String
Extracts and validates a String value. Throws FormatException if value is not a String.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited