CodeMeltedJSON class

Defines a set of utility methods for performing data conversions for JSON along with data validation.

Constructors

CodeMeltedJSON()
Gets the single instance of the API.
factory

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

checkHasProperty({required CObject obj, required String key}) bool
Determines if a CObject has a given property contained within.
checkType<T>({required dynamic data}) bool
Determines if the variable is of the expected type.
checkValidUrl({required String data}) bool
Determines if the data type is a valid URL.
jsonParse({required String data}) CObject?
Will convert data into a JSON CObject or return null if the decode could not be achieved.
jsonStringify({required CObject data}) String?
Will encode the JSON CObject into a string or null if the encode could not be achieved.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
tryHasProperty({required CObject obj, required String key}) → void
Same as checkHasProperty but throws an exception if the key is not found.
tryType<T>({required dynamic data}) → void
Same as checkType but throws an exception if not of the expected type.
tryValidUrl({required String data}) → void
Same as checkValidUrl but throws an exception if not a valid URL type.

Operators

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