Skip to content

everysk/orjson

 
 

Repository files navigation

everysk-orjson

everysk-orjson is a high-performance JSON library for Python, forked from orjson. It provides fast serialization and deserialization, with additional features for handling big integers and special floating-point values.

Features

  • Big Integer Support
    Parse large integers without loss of precision using the OPT_BIG_INTEGER option.

    import orjson
    
    result = orjson.dumps(100000000000000000001, option=orjson.OPT_BIG_INTEGER)
    print(result) # b'100000000000000000001'
    
    result = orjson.loads(b'100000000000000000001', option=orjson.OPT_BIG_INTEGER)
    print(result)  # 100000000000000000001
  • NaN as Null
    Convert NaN values to null during deserialization with the OPT_NAN_AS_NULL option.

    import orjson
    
    result = orjson.loads('{"x": nan}', option=orjson.OPT_NAN_AS_NULL)
    print(result)  # {'x': None}

Installation

pip install everysk-orjson

Usage

everysk-orjson is a drop-in replacement for orjson. Simply import and use the additional options as needed.

License

Available to you under either the Apache 2 license or MIT license at your choice. See LICENSE-APACHE or LICENSE-MIT for details.

artifact

About

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

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 56.8%
  • Rust 41.9%
  • Shell 1.3%