TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

JSON for Modern C++

189 pointsby gballanover 5 years ago

14 comments

kyberiasover 5 years ago
I don&#x27;t understand the JSON obsession. JSON as any other file format should be a small detail in any application and require very little plumbing code.<p>In every application, any dependency to JSON should be minimized, contained and preferably eliminated.
评论 #21106572 未加载
评论 #21108788 未加载
评论 #21109718 未加载
评论 #21109198 未加载
评论 #21108552 未加载
评论 #21107011 未加载
评论 #21106771 未加载
评论 #21106858 未加载
评论 #21107119 未加载
评论 #21107717 未加载
评论 #21107331 未加载
评论 #21109083 未加载
einpoklumover 5 years ago
How does this compare with RapidJSON, JSONCpp and JSON Spirit - other popular C++ JSON parser libraries?<p>Links:<p><a href="http:&#x2F;&#x2F;rapidjson.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;rapidjson.org&#x2F;</a> <a href="https:&#x2F;&#x2F;github.com&#x2F;Tencent&#x2F;rapidjson" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Tencent&#x2F;rapidjson</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;open-source-parsers&#x2F;jsoncpp" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;open-source-parsers&#x2F;jsoncpp</a><p><a href="https:&#x2F;&#x2F;www.codeproject.com&#x2F;Articles&#x2F;20027&#x2F;JSON-Spirit-A-C-JSON-Parser-Generator-Implemented" rel="nofollow">https:&#x2F;&#x2F;www.codeproject.com&#x2F;Articles&#x2F;20027&#x2F;JSON-Spirit-A-C-J...</a>
评论 #21106073 未加载
评论 #21106117 未加载
评论 #21108633 未加载
Teknoman117over 5 years ago
My only mild complaint with this particular JSON library is that it&#x27;s fairly easy to shoot yourself in the foot with the compile times if you don&#x27;t explicitly ensure that you use the json_fwd.hpp header in your headers.
评论 #21109223 未加载
stevekempover 5 years ago
Kudos on the very thorough readme, complete with CMake instructions, most of the time people take it for granted that you know how to embed libraries and dependencies.<p>Writing documentation, and easing users into your project, is an underrated skill.
评论 #21106187 未加载
评论 #21106029 未加载
amirmasoudabdolover 5 years ago
This is a solid project and I’m using it in many different projects for years. The developer team is responsive and care about the quality of the project as well as people’s need. I can not recommend it enough.
评论 #21107500 未加载
jchwover 5 years ago
Note that this library basically requires exceptions to be enabled, which may or may not be the case in your environment.<p>(It is actually possible to use without, but then exceptions become aborts, and you have to dance around that.)
baltbaltover 5 years ago
I don&#x27;t understand those single header libraries. Anyone writing code in c or c++ knows how to link a library. It&#x27;s really annoying when writing code for a platform with limited ram.
评论 #21109243 未加载
wodenokotoover 5 years ago
&gt; In languages such as Python, JSON feels like a first class data type.<p>Is that because the python dictionary happens to looks so much like json, or what do they mean?
评论 #21106200 未加载
评论 #21106106 未加载
评论 #21107030 未加载
评论 #21106067 未加载
omouseover 5 years ago
I&#x27;m wondering what the difference between this and json-cpp <a href="https:&#x2F;&#x2F;github.com&#x2F;open-source-parsers&#x2F;jsoncpp" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;open-source-parsers&#x2F;jsoncpp</a> is. They look like they provide the same functionality, albeit this looks more &quot;modern C++ style&quot;?
评论 #21106922 未加载
评论 #21109234 未加载
mirsadmover 5 years ago
I have been using json11 for a few years now (<a href="https:&#x2F;&#x2F;github.com&#x2F;dropbox&#x2F;json11" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dropbox&#x2F;json11</a>). It looks like it has been abandoned though. This seems like a great alternative.
评论 #21106111 未加载
psyclobeover 5 years ago
Its a great library however 99% of its &#x27;wow&#x27; moment can now be easily replicated with a few meta checks and can be adapted to basically any 3rd party json system.
etaioinshrdluover 5 years ago
I used this library on bare metal arduino a year ago. It felt funny doing high level programming on such crappy hardware!
de_watcherover 5 years ago
We just use the good old Qt JSON parser&#x2F;generator.<p>It&#x27;s basic and has no compilation speed issues.
pretty_colorsover 5 years ago
Gource for this repo: <a href="https:&#x2F;&#x2F;youtu.be&#x2F;cyaCZDffAbQ" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;cyaCZDffAbQ</a>