An open API service indexing awesome lists of open source software.

https://github.com/lzpdark/jsonparser

try to parse json, make it easy to unserstand
https://github.com/lzpdark/jsonparser

cpp json

Last synced: about 2 months ago
JSON representation

try to parse json, make it easy to unserstand

Awesome Lists containing this project

README

          

# jsonparser

An easy implement of json-parser.

## Usage

#### parse string into object

```cpp
const char *input = "{\"subObj\":{\"subAge\":13}, \"age\":12, \"name\":\"lzp\", \"gender\":\"man\", \"good\":true, \"hungry\":false, \"tag\":null}";
auto jsonObj = parseObject(input);
```

#### get string from object

```cpp
JsonObject obj;
obj.addValue("num_key", 1);
obj.addValue("false_key", false);
std::cout << toJson(&obj) << std::endl;
```