crossmint_core_parsing library

Functions

optionalString(CrossmintJsonMap map, String key) String?
Returns the string at key in map if it exists and is a string, otherwise null. Empty strings are returned as-is so callers can distinguish "absent" from "explicitly empty" if needed.
readItemMaps(Object? body) List<CrossmintJsonMap>
readOptionalMap(Object? value) CrossmintJsonMap?
readOptionalString(CrossmintJsonMap source, List<String> keys) String?
readRequiredString(CrossmintJsonMap source, List<String> keys, {required String entityName, required CrossmintException exceptionFactory(String, {Object? cause})}) String
requireBool(CrossmintJsonMap map, String key, {required String entity}) bool
Returns the boolean at key in map, or throws a typed CrossmintDeserializationException naming entity and key.
requireInt(CrossmintJsonMap map, String key, {required String entity}) int
Returns the integer at key in map, or throws a typed CrossmintDeserializationException naming entity and key.
requireMap(CrossmintJsonMap map, String key, {required String entity}) CrossmintJsonMap
Returns the nested JSON object at key in map, or throws a typed CrossmintDeserializationException naming entity and key.
requireMapList(CrossmintJsonMap map, String key, {required String entity}) List<CrossmintJsonMap>
Returns the list of nested JSON objects at key in map, or throws a typed CrossmintDeserializationException naming entity and key.
requireString(CrossmintJsonMap map, String key, {required String entity}) String
Returns the non-empty string at key in map, or throws a typed CrossmintDeserializationException naming entity and key.