Skip to content

Compiles JSON into static constexpr C++ data structures with nlohmann::json API

License

Notifications You must be signed in to change notification settings

lefticus/json2cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

87addaa · Apr 21, 2023

History

91 Commits
Apr 21, 2023
Apr 21, 2023
Feb 1, 2023
Apr 21, 2023
Apr 21, 2023
Apr 21, 2023
Apr 21, 2023
Jan 31, 2022
Feb 1, 2022
Jan 31, 2022
Jan 31, 2022
Jan 31, 2022
Feb 6, 2022
Apr 21, 2023
Apr 21, 2023
Jan 31, 2022
Feb 11, 2022
Apr 21, 2023
Feb 10, 2022

Repository files navigation

json2cpp

CI codecov Language grade: C++

json2cpp compiles a json file into static constexpr data structures that can be used at compile time or runtime.

Features

  • Literally 0 runtime overhead for loading the statically compiled JSON resource
  • Fully constexpr capable if you want to make compile-time decisions based on the JSON resource file
  • A .cpp firewall file is provided for you, if you have a large resource and don't want to pay the cost of compiling it more than once (but for normal size files it is VERY fast to compile, they are just data structures)
  • nlohmann::json compatible API (should be a drop-in replacement, some features might still be missing)
  • valijson adapter file provided

See the test folder for examples for building resources, using the valijson adapter, constexpr usage of resources, and firewalled usage of resources.

About

Compiles JSON into static constexpr C++ data structures with nlohmann::json API

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 3