SignalR-Client-Cpp should consider using a different json library
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
## Summary
The alpha4 release has incorporated the use of the jsoncpp library. The team should consider switching to the nlohmann json library. The nlohmann library is a header-only library (https://github.com/nlohmann/json).
## Motivation and goals
There are a few reasons why a header-only json library might fit better with signalR.
1) Less to build - every library that signalr depends upon needs to be built. this might eventually make it harder to build/deploy signalr for non-standard platforms (e.g. we went through a 9-month period where vcpkg could not be used on RPi due to a variety of issues. adding jsoncpp as a dependency simply makes that potential problem surface area even larger).
2) Less to deploy - each library dependency increases the final set of deployment files.
3) Better performance - parse time and peak memory stats for nlohmann are better than jsoncpp. The less time it takes to process json, the better. The less impact on memory, even better. Small boards with limited resources don't need to spend extra time parsing and memory allocs are super slow. Here's a handy reference that illustrates various benchmarks for common json libraries, including both jsoncpp and nlohmann, https://lokiastari.com/Json/Performance.linux.html
## In scope
Changing library dependency.
## Out of scope
Performance testing of libraries. It's been done by others.
## Risks / unknowns
Incorporating this change should effectively backing out the compilation and deployment changes introduced with alpha4.
Contributor guide
Assessment
This issue has not been assessed yet.