from_json_to_json library

Functions

dateTimeFromIso8601String(String? value) DateTime?
Converts an ISO 8601 string to a DateTime object.
dateTimeFromMillisecondsSinceEpoch(int? millisecondsSinceEpoch) DateTime?
Converts milliseconds since epoch to a DateTime object.
dateTimeFromYYYYMMDDHMMSSAM(String? value) DateTime?
Converts a custom formatted string to a DateTime object.
dateTimeToIso8601String(DateTime? value) String?
Converts a DateTime object to an ISO 8601 string.
dateTimeToMillisecondsSinceEpoch(DateTime? dateTime) int?
Converts a DateTime object to milliseconds since epoch.
dateTimeToYYYYMMDDHMMSSAM(DateTime? dateTime) String?
Converts a DateTime object to a custom formatted string.
extractIntFromString(String input) int
Extracts the first integer found in a string.
jsonDecodeBool(dynamic value) bool
Converts a dynamic value to a bool.
jsonDecodeDouble(dynamic value) double
Converts a dynamic value to a double.
jsonDecodeDurationFromISO8601(String? iso8601Duration) Duration
Parses ISO 8601 duration format to a Duration.
jsonDecodeDurationInMicroseconds(dynamic value) Duration
Converts a dynamic value to a Duration in microseconds.
jsonDecodeDurationInMinutes(dynamic value) Duration
Converts a dynamic value to a Duration in minutes.
jsonDecodeDurationInSeconds(dynamic value) Duration
Converts a dynamic value to a Duration in seconds.
jsonDecodeInt(dynamic value) int
Converts a dynamic value to an int.
jsonDecodeList(dynamic json) List
Decodes a JSON string into a List<dynamic>, always returning a list.
jsonDecodeListAs<T>(dynamic json) List<T>
Decodes and casts a JSON string into a List<T>.
jsonDecodeMap(dynamic json) Map<String, dynamic>
Decodes a JSON string into a Map<String, dynamic>, always returning a map.
jsonDecodeMapAs<K, V>(dynamic json) Map<K, V>
Decodes a JSON string into a Map<K, V>, throwing errors for invalid types.
jsonDecodeNullableDouble(dynamic value) double?
Converts a dynamic value to a nullable double.
jsonDecodeNullableInt(dynamic value) int?
Converts a dynamic value to a nullable int.
jsonDecodeNullableMap(dynamic json) Map<String, dynamic>?
Decodes a JSON string into a non-empty Map<String, dynamic> or null.
jsonDecodeString(dynamic value) String
Converts a dynamic value to a String.
jsonDecodeThrowableMap(dynamic json) Map<String, dynamic>
Decodes a JSON string into a Map<String, dynamic>, throwing errors for invalid input.
jsonEncodeBool(bool value) → dynamic
Safe conversion of a bool to a JSON
jsonEncodeDouble(double value) → dynamic
Converts a double to a dynamic value for JSON encoding.
jsonEncodeDurationInMicroseconds(Duration duration) int
Converts a Duration to microseconds for JSON encoding.
jsonEncodeDurationInMinutes(Duration duration) int
Converts a Duration to minutes for JSON encoding.
jsonEncodeDurationInSeconds(Duration duration) int
Converts a Duration to seconds for JSON encoding.
jsonEncodeDurationToISO8601(Duration duration) String
Converts a Duration to ISO 8601 duration format string.
jsonEncodeInt(int value) → dynamic
Converts an int to a dynamic value for JSON encoding.
jsonEncodeString(String value) → dynamic
Identity function for String values in JSON encoding.
verifyListDecodability(dynamic json) bool
Checks if a string is potentially decodable as a JSON array.
verifyMapDecodability(dynamic json) bool
Checks if a string is potentially decodable as a JSON object.