`json-c` {#mainpage}
========
JSON-C - A JSON implementation in C
-----------------------------------
Build Status
* [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/json-c/json-c?branch=master&svg=true)](https://ci.appveyor.com/project/hawicz/json-c)
* [![Travis Build Status](https://travis-ci.org/json-c/json-c.svg?branch=master)](https://travis-ci.org/json-c/json-c)
JSON-C implements a reference counting object model that allows you to easily
construct JSON objects in C, output them as JSON formatted strings and parse
JSON formatted strings back into the C representation of JSON objects.
It aims to conform to [RFC 7159](https://tools.ietf.org/html/rfc7159).
Building on Unix with `git`, `gcc` and `autotools`
--------------------------------------------------
Home page for json-c: https://github.com/json-c/json-c/wiki
### Prerequisites:
See also the "Installing prerequisites" section below.
- `gcc`, `clang`, or another C compiler
- `libtool>=2.2.6b`
If you're not using a release tarball, you'll also need:
- `autoconf>=2.64` (`autoreconf`)
- `automake>=1.10.3`
Make sure you have a complete `libtool` install, including `libtoolize`.
### Build instructions:
`json-c` GitHub repo: https://github.com/json-c/json-c
```sh
$ git clone https://github.com/json-c/json-c.git
$ cd json-c
$ sh autogen.sh
```
followed by
```sh
$ ./configure
$ make
$ make install
```
To build and run the test programs:
```sh
$ make check
```
Linking to `libjson-c`
----------------------
If your system has `pkgconfig`,
then you can just add this to your `makefile`:
```make
CFLAGS += $(shell pkg-config --cflags json-c)
LDFLAGS += $(shell pkg-config --libs json-c)
```
Without `pkgconfig`, you would do something like this:
```make
JSON_C_DIR=/path/to/json_c/install
CFLAGS += -I$(JSON_C_DIR)/include/json-c
LDFLAGS+= -L$(JSON_C_DIR)/lib -ljson-c
```
Install prerequisites
-----------------------
If you are on a relatively modern system, you'll likely be able to install
the prerequisites using your OS's packaging system.
### Install using apt (e.g. Ubuntu 16.04.2 LTS)
```sh
sudo apt install git
sudo apt install autoconf automake libtool
sudo apt install valgrind # optional
```
Then start from the "git clone" command, above.
### Manually install and build autoconf, automake and libtool
For older OS's that don't have up-to-date version of the packages will
require a bit more work. For example, CentOS release 5.11, etc...
```sh
curl -O http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
curl -O http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
curl -O http://ftp.gnu.org/gnu/libtool/libtool-2.2.6b.tar.gz
tar xzf autoconf-2.69.tar.gz
tar xzf automake-1.15.tar.gz
tar xzf libtool-2.2.6b.tar.gz
export PATH=${HOME}/ac_install/bin:$PATH
(cd autoconf-2.69 && \
./configure --prefix ${HOME}/ac_install && \
make && \
make install)
(cd automake-1.15 && \
./configure --prefix ${HOME}/ac_install && \
make && \
make install)
(cd libtool-2.2.6b && \
./configure --prefix ${HOME}/ac_install && \
make && \
make install)
```
没有合适的资源?快使用搜索试试~ 我知道了~
json-c-master.zip_cjsonobject master_softjbc_配置文件 开发
共139个文件
c:34个
expected:25个
h:22个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 163 浏览量
2022-09-20
11:02:37
上传
评论
收藏 148KB ZIP 举报
温馨提示
用于大中型项目开发,配置解析的第三方库的接口。
资源推荐
资源详情
资源评论
收起资源包目录
json-c-master.zip_cjsonobject master_softjbc_配置文件 开发 (139个子文件)
configure.ac 4KB
Makefile.am 2KB
Makefile.am 2KB
AUTHORS 165B
json_object.c 30KB
json_tokener.c 28KB
linkhash.c 21KB
test_parse.c 15KB
test_json_pointer.c 9KB
test1.c 8KB
json_util.c 8KB
json_pointer.c 7KB
test_util_file.c 5KB
test_printbuf.c 5KB
json_object_iterator.c 5KB
test_compare.c 5KB
random_seed.c 4KB
json_visit.c 4KB
printbuf.c 3KB
test_cast.c 3KB
arraylist.c 3KB
test_visit.c 3KB
test_double_serializer.c 2KB
test_parse_int64.c 2KB
test_set_serializer.c 2KB
testReplaceExisting.c 2KB
strerror_override.c 2KB
test_set_value.c 2KB
test_locale.c 2KB
debug.c 1KB
test_null.c 1KB
test4.c 1KB
test2.c 1KB
parse_flags.c 981B
test_float.c 843B
test_charcase.c 762B
libjson.c 624B
json_c_version.c 364B
ChangeLog 10KB
COPYING 2KB
Doxyfile 46KB
.editorconfig 260B
test_parse.expected 6KB
test_visit.expected 4KB
test_cast.expected 2KB
test_util_file.expected 2KB
test_json_pointer.expected 2KB
test1.expected 2KB
test1Formatted_pretty.expected 2KB
test1Formatted_spaced.expected 1KB
test1Formatted_plain.expected 1KB
test_parse_int64.expected 1KB
test_printbuf.expected 1KB
test2Formatted_pretty.expected 536B
test_double_serializer.expected 532B
test_compare.expected 529B
test_set_serializer.expected 512B
testReplaceExisting.expected 484B
test2Formatted_spaced.expected 382B
test2.expected 382B
test2Formatted_plain.expected 348B
test4.expected 116B
test_locale.expected 113B
test_null.expected 95B
test_set_value.expected 71B
test_float.expected 63B
test_charcase.expected 3B
json-c.vcxproj.filters 3KB
.gitignore 1KB
json_object.h 34KB
linkhash.h 10KB
json_object_iterator.h 8KB
json_tokener.h 7KB
json_pointer.h 5KB
printbuf.h 3KB
json_visit.h 3KB
json_util.h 3KB
debug.h 2KB
json_object_private.h 1KB
arraylist.h 1KB
vasprintf_compat.h 1KB
json.h 707B
bits.h 699B
json_c_version.h 684B
math_compat.h 548B
strerror_override.h 419B
random_seed.h 407B
strdup_compat.h 271B
json_inttypes.h 255B
strerror_override_private.h 180B
parse_flags.h 95B
README.html 2KB
README-WIN32.html 1KB
json-c.pc.in 244B
json-c-uninstalled.pc.in 218B
json_config.h.in 91B
INSTALL 47B
valid.json 12B
ax_compile_check_sizeof.m4 4KB
ax_check_compile_flag.m4 3KB
共 139 条
- 1
- 2
资源评论
小贝德罗
- 粉丝: 70
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功