资源简介
c /c++ 上使用json, 类比 android 或java 等json . 请下载使用.

代码片段和文件信息
/*
Copyright (c) 2009-2017 Dave Gamble and cJSON contributors
Permission is hereby granted free of charge to any person obtaining a copy
of this software and associated documentation files (the “Software“) to deal
in the Software without restriction including without limitation the rights
to use copy modify merge publish distribute sublicense and/or sell
copies of the Software and to permit persons to whom the Software is
furnished to do so subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS“ WITHOUT WARRANTY OF ANY KIND EXPRESS OR
IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM DAMAGES OR OTHER
LIABILITY WHETHER IN AN ACTION OF CONTRACT TORT OR OTHERWISE ARISING FROM
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/* cJSON */
/* JSON parser in C. */
/* disable warnings about old C89 functions in MSVC */
#if !defined(_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER)
#define _CRT_SECURE_NO_DEPRECATE
#endif
#ifdef __GNUC__
#pragma GCC visibility push(default)
#endif
#if defined(_MSC_VER)
#pragma warning (push)
/* disable warning about single line comments in system headers */
#pragma warning (disable : 4001)
#endif
#include
#include
#include
#include
#include
#include
#include
#ifdef ENABLE_LOCALES
#include
#endif
#if defined(_MSC_VER)
#pragma warning (pop)
#endif
#ifdef __GNUC__
#pragma GCC visibility pop
#endif
#include “cJSON.h“
/* define our own boolean type */
#define true ((cJSON_bool)1)
#define false ((cJSON_bool)0)
typedef struct {
const unsigned char *json;
size_t position;
} error;
static error global_error = { NULL 0 };
CJSON_PUBLIC(const char *) cJSON_GetErrorPtr(void)
{
return (const char*) (global_error.json + global_error.position);
}
CJSON_PUBLIC(char *) cJSON_GetStringValue(cJSON *item) {
if (!cJSON_IsString(item)) {
return NULL;
}
return item->valuestring;
}
/* This is a safeguard to prevent copy-pasters from using incompatible C and header files */
#if (CJSON_VERSION_MAJOR != 1) || (CJSON_VERSION_MINOR != 7) || (CJSON_VERSION_PATCH != 6)
#error cJSON.h and cJSON.c have different versions. Make sure that both have the same.
#endif
CJSON_PUBLIC(const char*) cJSON_Version(void)
{
static char version[15];
sprintf(version “%i.%i.%i“ CJSON_VERSION_MAJOR CJSON_VERSION_MINOR CJSON_VERSION_PATCH);
return version;
}
/* Case insensitive string comparison doesn‘t consider two NULL pointers equal though */
static int case_insensitive_strcmp(const unsigned char *string1 const unsigned char *string2)
{
i
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-04-13 04:32 cJSON-master\
目录 0 2018-04-13 04:32 cJSON-master\.github\
文件 2386 2018-04-13 04:32 cJSON-master\.github\CONTRIBUTING.md
文件 134 2018-04-13 04:32 cJSON-master\.gitignore
文件 602 2018-04-13 04:32 cJSON-master\.travis.yml
文件 13767 2018-04-13 04:32 cJSON-master\CHANGELOG.md
文件 9125 2018-04-13 04:32 cJSON-master\CMakeLists.txt
文件 2057 2018-04-13 04:32 cJSON-master\CONTRIBUTORS.md
文件 1084 2018-04-13 04:32 cJSON-master\LICENSE
文件 4474 2018-04-13 04:32 cJSON-master\Makefile
文件 25979 2018-04-13 04:32 cJSON-master\README.md
文件 2284 2018-04-13 04:32 cJSON-master\appveyor.yml
文件 73211 2018-04-13 04:32 cJSON-master\cJSON.c
文件 14566 2018-04-13 04:32 cJSON-master\cJSON.h
文件 40019 2018-04-13 04:32 cJSON-master\cJSON_Utils.c
文件 3938 2018-04-13 04:32 cJSON-master\cJSON_Utils.h
目录 0 2018-04-13 04:32 cJSON-master\fuzzing\
文件 10 2018-04-13 04:32 cJSON-master\fuzzing\.gitignore
文件 1032 2018-04-13 04:32 cJSON-master\fuzzing\CMakeLists.txt
文件 153 2018-04-13 04:32 cJSON-master\fuzzing\afl-prepare-linux.sh
文件 4192 2018-04-13 04:32 cJSON-master\fuzzing\afl.c
文件 192 2018-04-13 04:32 cJSON-master\fuzzing\afl.sh
目录 0 2018-04-13 04:32 cJSON-master\fuzzing\inputs\
文件 585 2018-04-13 04:32 cJSON-master\fuzzing\inputs\test1
文件 81 2018-04-13 04:32 cJSON-master\fuzzing\inputs\test10
文件 151 2018-04-13 04:32 cJSON-master\fuzzing\inputs\test11
文件 244 2018-04-13 04:32 cJSON-master\fuzzing\inputs\test2
文件 603 2018-04-13 04:32 cJSON-master\fuzzing\inputs\test3
文件 603 2018-04-13 04:32 cJSON-master\fuzzing\inputs\test3.bu
文件 603 2018-04-13 04:32 cJSON-master\fuzzing\inputs\test3.uf
文件 603 2018-04-13 04:32 cJSON-master\fuzzing\inputs\test3.uu
............此处省略225个文件信息
相关资源
- java串口通信全套完整代码-导入eclip
- android带百分比进度条的文件上传,使
- jsonarray所必需的6个jar包.rar
- 当当网完整项目、包括js、css、html
- java代码编写将excel数据导入到mysql数据
- Java写的cmm词法分析器源代码及javacc学
- pc与android通过usb socket实现手机通信
- commons-beanutils-1.8.3.jar
- ehcache-core-2.5.1.jar
- java Socket发送/接受报文
- java中实现将页面数据导入Excel中
- java 企业销售管理系统
- JSP,SQL,MVC的选课系统
- 基于jsp的bbs论坛 非常详细
- 基于C/S架构考试系统(Java)
- java access 仓库管理系统 源码
- DES(CFB) JAVA
- jsp oracle通讯录
- java sql2008的图书馆管理系统
- android通过JDBC连接Mysql数据库
- CMM_词法分析和语法分析_java编写
- 指纹传感器FPC1080在android下的驱动
- delphi xe5 android 调用照相机摄像头拍照
- java端口扫描程序
- Java版聊天程序(UDP TCP 多线程)
- 简单qq聊天(Java socket实现)
- java多人五子棋源码
- JSP课程设计-留言本 jsp mysql tomcat实现
- 用Java实现TCP通信
- 采用TCP SOCKET技术编写C/S模式的java聊天
评论
共有 条评论