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
+13-9Lines changed: 13 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,14 @@
10
10
11
11
## Preface
12
12
Please submit pull requests if you don't agree with some behaviour or found a bug, I would appreciate it.
13
-
I recently changed the versioning on the releases to indicate that this lib ist still under development and free to change.
13
+
The library is further matured now and changes less.
14
+
15
+
This library can parse and stringify and is designed for easy use.
16
+
Nobody wants to write parsing and stringification methods for every class they write. We rather want it
17
+
to work "just like that" without thinking about it. This is where this library fits in.
18
+
This idea of producing and consuming JSON has become the "Hello World of Introspection".
19
+
20
+
Since release 0.3, the library also features basic JSON beautification using boost iostreams.
14
21
15
22
## Introduction
16
23
A JSON stringifier / parser that uses boost fusion introspection methods for automagic struct <-> JSON conversion
@@ -19,15 +26,13 @@ Its supports almost all STL contstructs in stringify and the most important for
19
26
With the STL as a basis it is an easy to extend mechanism using classes. Use boost fusion and the provided utility
20
27
(see example below) or provide your own parse/stringify methods.
21
28
22
-
INFO: I changed the versions from 1.x something something to 0.x something something, because I realised that I am likely not going to hesitate breaking interface or implementation. This has still very much potential and is wide open for improvements.
23
-
24
-
NOTE: This library is not fine tuned for speed.
29
+
NOTE: The performance of this library is mostly influenced by boost property tree which is used for parsing JSON.
30
+
The main focus of this library is not speed, but ease of use and convenience. If you want to be fast, try RapidJson (not saying it is particullarly slow, but probably not suitable for high data frequency or big bulk data application)
25
31
26
32
Dependencies:
27
33
> boost/property_tree <br>
28
34
> boost/fusion <br>
29
35
> boost/mpl <br>
30
-
> boost/phoenix <br>
31
36
32
37
Code example:
33
38
```C++
@@ -103,8 +108,8 @@ There is just one function for stringification. This stringify function is heavi
103
108
104
109
* The library supports almost all STL containers (stringify supports even more) as well as fundamental types. <br>
105
110
* Containers will decay into json arrays, if their value_type is a stringifiable (this is recursive).
106
-
* Classes will turn into objects, if it is adapted, derives from FusionStruct<> and each parameter is stringifiable.
107
-
* The stringify class member is called if provided, you have to make sure yourself that what you produce makes sense.
111
+
* Classes will turn into objects, if it is adapted, derives from FusionStruct<> and each member is stringifiable.
112
+
* For other classes, the "stringify" method is called, if provided, but then you will have to make sure on your own to produce a valid output. (The base64 wrapper uses this).
0 commit comments