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
Copy file name to clipboardExpand all lines: README.md
+28-11
Original file line number
Diff line number
Diff line change
@@ -341,12 +341,17 @@ Finally, it is very easy to extend full support to your own classes, refer to th
341
341
342
342
## Serialization formats
343
343
344
-
reflect-cpp currently supports the following serialization formats:
344
+
reflect-cpp is deliberately designed in a very modular way, using [concepts](https://en.cppreference.com/w/cpp/language/constraints), to make it as easy as possible to interface C or C++ libraries for various serialization formats. Refer to the [documentation](https://github.com/getml/reflect-cpp/tree/main/docs) for details. PRs related to serialization formats are welcome.
345
345
346
-
-**JSON**: Out-of-the-box support, no additional dependencies required.
The following table lists the serialization formats currently supported by reflect-cpp and the underlying libraries used:
348
347
349
-
reflect-cpp is deliberately designed in a very modular format, using [concepts](https://en.cppreference.com/w/cpp/language/constraints), to make it as easy as possible to support additional serialization formats. Refer to the [documentation](https://github.com/getml/reflect-cpp/tree/main/docs) for details. PRs related to serialization formats are welcome.
348
+
| Format | Library | Version | License | Remarks |
| XML |[pugixml](https://github.com/zeux/pugixml)| >= 1.14 | MIT ||
353
+
354
+
Please also refer to the *vcpkg.json* in this repository.
350
355
351
356
## Documentation
352
357
@@ -367,7 +372,7 @@ If you **do not** need JSON support or you want to link YYJSON yourself, then re
367
372
368
373
Simply copy the contents of the folder `include` into your source repository or add it to your include path and also add `src/yyjson.c` to your source files for compilation.
369
374
370
-
If you need support for other serialization formats like flexbuffers, you should also include and link the respective libraries, as listed in the previous section.
375
+
If you need support for other serialization formats like flexbuffers or XML, you should also include and link the respective libraries, as listed in the section on serialization formats.
371
376
372
377
### Option 3: Compilation using cmake
373
378
@@ -399,6 +404,7 @@ To use reflect-cpp in your project:
399
404
add_subdirectory(reflect-cpp) # Add this project as a subdirectory
400
405
401
406
set(REFLECTCPP_FLEXBUFFERS ON) # Optional
407
+
set(REFLECTCPP_XML ON) # Optional
402
408
403
409
target_link_libraries(your_project PRIVATE reflectcpp) # Link against the library
404
410
```
@@ -413,17 +419,26 @@ vcpkg is a great, but very ambitious and complex project (just like C++ is a gre
413
419
414
420
3. On some occasions you might be asked to specify a compiler. You can do so by simply adding it to the cmake command as follows: `cmake -S . -B build ... -DCMAKE_C_COMPILER=gcc -DCMAKE_C_COMPILER=g++` or `cmake -S . -B build ... -DCMAKE_C_COMPILER=clang-17 -DCMAKE_C_COMPILER=clang++-17` (or whatever supported compiler you would like to use).
@@ -453,7 +474,3 @@ reflect-cpp has been developed by [scaleML](https://www.scaleml.de), a company s
453
474
reflect-cpp is released under the MIT License. Refer to the LICENSE file for details.
454
475
455
476
reflect-cpp includes [YYJSON](https://github.com/ibireme/yyjson), the fastest JSON library currently in existence. YYJSON is written by YaoYuan and also released under the MIT License.
0 commit comments