The serializer returns ASCII data that can safely be used in an HTML template. Apostrophes, ampersands, greater-than, and less-then signs are encoded as unicode escaped sequences. E.g. this snippet is safe for any and all input:
"<a onclick='alert(" + encode(data) + ")'>show message</a>"
Unless the input contains infinite or NaN values, the result will be valid JSON data.
~pyjson5.encode ~pyjson5.encode_bytes ~pyjson5.encode_callback ~pyjson5.encode_io ~pyjson5.encode_noop ~pyjson5.dump ~pyjson5.dumps ~pyjson5.Options ~pyjson5.Json5EncoderException ~pyjson5.Json5UnstringifiableType
pyjson5.encode
pyjson5.encode_bytes
pyjson5.encode_callback
pyjson5.encode_io
pyjson5.encode_noop
pyjson5.Options
pyjson5.dump
pyjson5.dumps
pyjson5.Json5Exception pyjson5.Json5EncoderException pyjson5.Json5UnstringifiableType
pyjson5.Json5EncoderException
pyjson5.Json5UnstringifiableType