Skip to main content

terra_sdk.util.json

dict_to_data


_1
def dict_to_data(d: dict) -> dict

Recursively calls to_data on dict

JSONSerializable Objects


_1
class JSONSerializable(ABC)

to_data


_1
def to_data() -> Any

Converts the object to its JSON-serializable Python data representation.

to_json


_1
def to_json() -> str

Marshals the object into a stringified JSON serialization. Keys are first sorted and the JSON rendered removes all unnecessary whitespace.

Returns:

  • str - JSON string representation