You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generate boilerplate C++ code, that uses parse_json library, from example json
1
+
# JSON to C++
2
+
This program will take either a json file or a URL to a web service and build C++ classes to work with that data. By default it will create the serialization linkage for the JsonLink library that is part of https://github.com/beached/parse_json .
3
3
4
+
# Requirements
5
+
CMake >= 2.8.12 https://cmake.org/
6
+
Boost >= 1.58 https://www.boost.com/
7
+
Curl https://curl.haxx.se/
8
+
9
+
Both Boost and Curl are often packaged within a Linux distribution and available for Windows/Mac
10
+
11
+
# Building
12
+
The build system uses cmake. Often a build can be accomplished by creating a build folder in the project source folder and typing
13
+
```
14
+
cmake ..
15
+
cmake --build .
16
+
```
17
+
# Running
18
+
To output the C++ code to the terminal one just needs to type json_to_cpp_bin --in_file jsonfile.json
19
+
20
+
```
21
+
Command line options
22
+
Options:
23
+
--help print option descriptions
24
+
--in_file arg json source file path or url
25
+
--out_file arg output c++ file
26
+
--use_jsonlink arg (=1) Use JsonLink serializaion/deserialization
0 commit comments