C / JSON Library in popular Linux distros? [closed

2020-02-26 16:36发布

问题:

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 7 years ago.

I have a program written in C that has to input and output JSON over a local domain socket. I've found several C / JSON libraries that 'almost work' through searches. Prior to taking one of the libraries that I found .. I want to be sure that I'm not over-looking a library that is commonly found on modern Linux distros.

I'd also really appreciate links to libraries that you use. Most likely, I'll just drop it in tree, unless I realize that I've over looked something widely distributed.

I am tagging this as subjective because the answer that I select is the one linking to a library that works for me, that does not mean its the 'best' library.

I want to take an existing array and easily convert it to a buffer that can be sent, or take a buffer and easily convert it into an allocated array.

Thanks in advance!

回答1:

json-Glib seems to be in the repositories for most distributions, I have not used it, so I cant speak as to its quality or stability.



回答2:

I'm not too much into C, but, MJSON just reached 1.0 ( http://sourceforge.net/projects/mjson/ ), and also, another recently updated project is json-c ( http://oss.metaparadigm.com/json-c/ )...