Displaying 4 results from an estimated 4 matches for "nlohmann".
2017 Oct 19
3
Adding a third-party dependency in clang-tools-extra
clangd communicates with an editor via JSON-RPC. It parses JSON with
YAMLParser, which is awkward, and generates JSON with printf and friends,
which is miserable. Much of LLVM does things this way, but clangd does it a
lot.
I'd like to try replacing this with a JSON library. nlohmann/json[1] seems
like a reasonable fit: C++11 with exceptions optional, simple build, MIT
license.
I'd propose vendoring it under tools/clang/tools/extra/clangd/nlohmann-json
so there's no question of it "leaking" into runtimes as described in this
thread[2].
This also means it woul...
2017 Oct 19
2
Adding a third-party dependency in clang-tools-extra
...d communicates with an editor via JSON-RPC. It parses JSON with
> YAMLParser, which is awkward, and generates JSON with printf and friends,
> which is miserable. Much of LLVM does things this way, but clangd does it a
> lot.
>
> I'd like to try replacing this with a JSON library. nlohmann/json[1] seems
> like a reasonable fit: C++11 with exceptions optional, simple build, MIT
> license.
>
> I'd propose vendoring it under tools/clang/tools/extra/clangd/nlohmann-json
> so there's no question of it "leaking" into runtimes as described in this
> threa...
2020 Aug 18
4
Adopting a third-party JSON library
...contributions to another project.
+ Possibly improved performance and API ergonomics.
- Likely compile times regression as many JSON libs are header-only.
- Risk of introducing bugs and breakages across LLVM.
As far as I can tell, these are the most popular C++ JSON libs:
* https://github.com/nlohmann/json
* https://github.com/open-source-parsers/jsoncpp
* https://github.com/Tencent/rapidjson
I'm trying to understand if this is something I should work on and whether or not it would benefit the project.
Filippo Costa
2017 Oct 27
10
RFC: Adding a JSON library to LLVM Support
We don't have a dedicated JSON library in the LLVM tree, I'd like to add
one. The pressing need is for clangd, but we have other tools that
read/write JSON too.
I'm proposing we write a new one, rather than importing a third-party
library (licensing/integration reasons), on or extending YamlParser/YamlIO
(usability/flexibility). I lean towards a design that parses a full DOM at
once,