MCPcopy Create free account
hub / github.com/StackStorm/st2 / json_encode_native_json

Function json_encode_native_json

st2common/st2common/util/jsonify.py:69–76  ·  view source on GitHub ↗
(obj, indent=4, sort_keys=False)

Source from the content-addressed store, hash-verified

67
68
69def json_encode_native_json(obj, indent=4, sort_keys=False):
70 if not indent:
71 separators = (",", ":")
72 else:
73 separators = None
74 return json.dumps(
75 obj, cls=GenericJSON, indent=indent, separators=separators, sort_keys=sort_keys
76 )
77
78
79def json_encode_orjson(obj, indent=None, sort_keys=False):

Callers 1

json_encodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected