MCPcopy Create free account
hub / github.com/btbytes/teh / encode_number

Method encode_number

lib/demjson.py:1220–1258  ·  view source on GitHub ↗

Encodes a Python numeric type into a JSON numeric literal. The special non-numeric values of float('nan'), float('inf') and float('-inf') are translated into appropriate JSON literals. Note that Python complex types are not handled, as there is no

(self, n)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

encode_helperMethod · 0.95

Calls 1

JSONEncodeErrorClass · 0.85

Tested by

no test coverage detected