Json Extra Uses Orjson Instead Of Ujson



Hacker News 1:15 pm on June 10, 2024


In the context of Pydantic and JSON parsing libraries, there is an interest in using orjson due to its speed, but concerns about switching to a forked version. An open request was made to make i.e., json library usage configurable. Suggestions included environmental variables and API overrides without adding direct code changes.

  • Configuration flexibility: Enabling users to choose their JSON parsing library through configuration.
  • Environmental variable proposal: Using an environment variable as a switch between default libraries and orjson.
  • API override concept: A system allowing dynamic switching in APIs for different encoding/decoding preferences.
  • Pull request discussion: The conversation around the pull request highlights users' interests in improving flexibility and usability without compromising stability.

https://github.com/pydantic/pydantic/pull/599

< Previous Story     -     Next Story >

Copy and Copyright Pubcon Inc.
1996-2024 all rights reserved. Privacy Policy.
All trademarks and copyrights held by respective owners.