How to use the orjson.OPT_NON_STR_KEYS function in orjson

To help you get started, we’ve selected a few orjson examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tweag / trustix / packages / trustix-nix-reprod / trustix_nix_reprod / api / models.py View on Github external
def _orjson_dumps(v, *, default) -> str:
    return orjson.dumps(v, default=default, option=orjson.OPT_NON_STR_KEYS).decode()

orjson

Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy

Apache-2.0
Latest version published 1 month ago

Package Health Score

90 / 100
Full package analysis