Skip to content
 
 

Repository files navigation

ReerJSON

A faster version of JSONDecoder based on yyjson

Coverage: 88% SwiftPM compatible

ReerJSON is a really fast JSON parser, and it's inspired by ZippyJSON and Ananda.

⚠️Important: When measuring the performance of Swift libraries, make sure you're building in Release Mode. When building Swift code on DEBUG compilation, it can be 10-20x slower than equivalent code on RELEASE.

Benchmarks

JSONDecoder

iOS 17+

CleanShot 2025-09-04 at 14 18 27@2x

CleanShot 2025-09-04 at 14 21 33@2x

Lower than iOS 17

CleanShot 2025-09-04 at 14 24 18@2x

macOS

CleanShot 2025-09-04 at 14 27 07@2x

Tested with ReerJSON 0.1.0, ZippyJSON 1.2.15, IkigaJSON 2.3.2

Code for Benchmarks

Usage

Just replace JSONDecoder with ReerJSONDecoder wherever you want to use it. So instead of let decoder = JSONDecoder(), do let decoder = ReerJSONDecoder(), and everything will just work. This is because ReerJSONDecoder has the exact same API as JSONDecoder. Also, don't forget to add import ReerJSON in files where you use it.

TODO

  • Add GitHub workflow for CI.
  • Support CodableWithConfiguration.
  • Support JSON5 decoding.
  • Implement ReerJSONEncoder.

License

This project is licensed under the MIT License. Portions of this project incorporate code from the following source code or test code:

See the LICENSE file for the full text of both licenses.

Acknowledgments

We would like to express our gratitude to the following projects and their contributors:

Special thanks to all the open-source contributors who made this project possible.

About

A faster version of JSONDecoder based on yyjson

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages