Commit 27dee111 authored by Milo Yip's avatar Milo Yip

Merge remote-tracking branch 'origin/document'

parents a96b6993 99ea434e
......@@ -5,4 +5,4 @@
dot $< -Tpng -o $@
DOTFILES = $(basename $(wildcard *.dot))
all: $(addsuffix .png, $(DOTFILES)) #$(addsuffix .pdf, $(DOTFILES))
all: $(addsuffix .png, $(DOTFILES)) $(addsuffix .pdf, $(DOTFILES))
digraph {
compound=true
fontname="Inconsolata, Consolas"
fontsize=10
margin="0,0"
ranksep=0.2
penwidth=0.5
node [fontname="Inconsolata, Consolas", fontsize=10, penwidth=0.5]
edge [fontname="Inconsolata, Consolas", fontsize=10, arrowhead=normal]
subgraph cluster1 {
margin="10,10"
labeljust="left"
label = "Before"
style=filled
fillcolor=gray95
node [shape=Mrecord, style=filled, colorscheme=spectral7]
{
rank = same
b1 [label="{b:number|456}", fillcolor=6]
a1 [label="{a:number|123}", fillcolor=6]
}
a1 -> b1 [style="dashed", label="Move", dir=back]
}
subgraph cluster2 {
margin="10,10"
labeljust="left"
label = "After"
style=filled
fillcolor=gray95
node [shape=Mrecord, style=filled, colorscheme=spectral7]
{
rank = same
b2 [label="{b:null|}", fillcolor=1]
a2 [label="{a:number|456}", fillcolor=6]
}
a2 -> b2 [style=invis, dir=back]
}
b1 -> b2 [style=invis]
}
\ No newline at end of file
digraph {
compound=true
fontname="Inconsolata, Consolas"
fontsize=10
margin="0,0"
ranksep=0.2
penwidth=0.5
node [fontname="Inconsolata, Consolas", fontsize=10, penwidth=0.5]
edge [fontname="Inconsolata, Consolas", fontsize=10, arrowhead=normal]
subgraph cluster1 {
margin="10,10"
labeljust="left"
label = "Before Copying (Hypothetic)"
style=filled
fillcolor=gray95
node [shape=Mrecord, style=filled, colorscheme=spectral7]
c1 [label="{contact:array|}", fillcolor=4]
c11 [label="{|}"]
c12 [label="{|}"]
c13 [shape="none", label="...", style="solid"]
o1 [label="{o:object|}", fillcolor=3]
ghost [label="{o:object|}", style=invis]
c1 -> o1 [style="dashed", label="AddMember", constraint=false]
edge [arrowhead=vee]
c1 -> { c11; c12; c13 }
o1 -> ghost [style=invis]
}
subgraph cluster2 {
margin="10,10"
labeljust="left"
label = "After Copying (Hypothetic)"
style=filled
fillcolor=gray95
node [shape=Mrecord, style=filled, colorscheme=spectral7]
c2 [label="{contact:array|}", fillcolor=4]
c3 [label="{array|}", fillcolor=4]
c21 [label="{|}"]
c22 [label="{|}"]
c23 [shape=none, label="...", style="solid"]
o2 [label="{o:object|}", fillcolor=3]
cs [label="{string|\"contact\"}", fillcolor=5]
c31 [label="{|}"]
c32 [label="{|}"]
c33 [shape="none", label="...", style="solid"]
edge [arrowhead=vee]
c2 -> { c21; c22; c23 }
o2 -> cs
cs -> c3 [arrowhead=none]
c3 -> { c31; c32; c33 }
}
ghost -> o2 [style=invis]
}
\ No newline at end of file
digraph {
compound=true
fontname="Inconsolata, Consolas"
fontsize=10
margin="0,0"
ranksep=0.2
penwidth=0.5
forcelabels=true
node [fontname="Inconsolata, Consolas", fontsize=10, penwidth=0.5]
edge [fontname="Inconsolata, Consolas", fontsize=10, arrowhead=normal]
subgraph cluster1 {
margin="10,10"
labeljust="left"
label = "Before Moving"
style=filled
fillcolor=gray95
node [shape=Mrecord, style=filled, colorscheme=spectral7]
c1 [label="{contact:array|}", fillcolor=4]
c11 [label="{|}"]
c12 [label="{|}"]
c13 [shape=none, label="...", style="solid"]
o1 [label="{o:object|}", fillcolor=3]
ghost [label="{o:object|}", style=invis]
c1 -> o1 [style="dashed", constraint=false, label="AddMember"]
edge [arrowhead=vee]
c1 -> { c11; c12; c13 }
o1 -> ghost [style=invis]
}
subgraph cluster2 {
margin="10,10"
labeljust="left"
label = "After Moving"
style=filled
fillcolor=gray95
node [shape=Mrecord, style=filled, colorscheme=spectral7]
c2 [label="{contact:null|}", fillcolor=1]
c3 [label="{array|}", fillcolor=4]
c21 [label="{|}"]
c22 [label="{|}"]
c23 [shape="none", label="...", style="solid"]
o2 [label="{o:object|}", fillcolor=3]
cs [label="{string|\"contact\"}", fillcolor=5]
c2 -> o2 [style="dashed", constraint=false, label="AddMember", style=invis]
edge [arrowhead=vee]
c3 -> { c21; c22; c23 }
o2 -> cs
cs -> c3 [arrowhead=none]
}
ghost -> o2 [style=invis]
}
\ No newline at end of file
......@@ -39,7 +39,7 @@ digraph {
}
edge [arrowhead=vee]
root -> { project, stars }
root -> { project; stars }
edge [arrowhead="none"]
project -> rapidjson
......
doc/diagram/simpledom.png

22.6 KB | W: | H:

doc/diagram/simpledom.png

23.4 KB | W: | H:

doc/diagram/simpledom.png
doc/diagram/simpledom.png
doc/diagram/simpledom.png
doc/diagram/simpledom.png
  • 2-up
  • Swipe
  • Onion skin
digraph {
compound=true
fontname="Inconsolata, Consolas"
fontsize=10
margin="0,0"
ranksep=0.2
penwidth=0.5
node [fontname="Inconsolata, Consolas", fontsize=10, penwidth=0.5]
edge [fontname="Inconsolata, Consolas", fontsize=10]
subgraph cluster1 {
margin="10,10"
labeljust="left"
label = "Document"
style=filled
fillcolor=gray95
node [shape=Mrecord, style=filled, colorscheme=spectral7]
root [label="{object|}", fillcolor=3]
{
hello [label="{string|\"hello\"}", fillcolor=5]
t [label="{string|\"t\"}", fillcolor=5]
f [label="{string|\"f\"}", fillcolor=5]
n [label="{string|\"n\"}", fillcolor=5]
i [label="{string|\"i\"}", fillcolor=5]
pi [label="{string|\"pi\"}", fillcolor=5]
a [label="{string|\"a\"}", fillcolor=5]
world [label="{string|\"world\"}", fillcolor=5]
true [label="{true|}", fillcolor=7]
false [label="{false|}", fillcolor=2]
null [label="{null|}", fillcolor=1]
i1 [label="{number|123}", fillcolor=6]
pi1 [label="{number|3.1416}", fillcolor=6]
array [label="{array|size=4}", fillcolor=4]
a1 [label="{number|1}", fillcolor=6]
a2 [label="{number|2}", fillcolor=6]
a3 [label="{number|3}", fillcolor=6]
a4 [label="{number|4}", fillcolor=6]
}
edge [arrowhead=vee]
root -> { hello; t; f; n; i; pi; a }
array -> { a1; a2; a3; a4 }
edge [arrowhead=none]
hello -> world
t -> true
f -> false
n -> null
i -> i1
pi -> pi1
a -> array
}
}
\ No newline at end of file
......@@ -19,7 +19,7 @@
## Standard compliance
* RapidJSON should be fully RFC4627/ECMA-404 compliance.
* Support unicode surrogate.
* Support Unicode surrogate.
* Support null character (`"\u0000"`)
* For example, `["Hello\u0000World"]` can be parsed and handled gracefully. There is API for getting/setting lengths of string.
......@@ -46,7 +46,7 @@
## DOM (Document)
* Support insitu parsing.
* Support *in situ* parsing.
* Parse JSON string values in-place at the source JSON, and then the DOM points to addresses of those strings.
* Faster than convention parsing: no allocation for strings, no copy (if string does not contain escapes), cache-friendly.
* Support 32-bit/64-bit signed/unsigned integer and `double` for JSON number type.
......@@ -55,7 +55,7 @@
## SAX (Reader)
* Support comprehensive error code if parsing failed.
* Support localizable error message.
* Support error message localization.
## SAX (Writer)
......
This diff is collapsed.
......@@ -16,7 +16,7 @@ RapidJSON is a JSON parser and generator for C++. It was inspired by [rapidxml](
* RapidJSON is memory friendly. Each JSON value occupies exactly 16/20 bytes for most 32/64-bit machines (excluding text string). By default it uses a fast memory allocator, and the parser allocates memory compactly during parsing.
* RapidJSON is Unicode friendly. It supports UTF-8, UTF-16, UTF-32 (LE & BE), and their detection, validataton and transcoding internally. For example, you can read a UTF-8 file and let RapidJSON transcode the JSON strings into UTF-16 in the DOM. It also supports surrogates and "\u0000" (null character).
* RapidJSON is Unicode friendly. It supports UTF-8, UTF-16, UTF-32 (LE & BE), and their detection, validation and transcoding internally. For example, you can read a UTF-8 file and let RapidJSON transcode the JSON strings into UTF-16 in the DOM. It also supports surrogates and "\u0000" (null character).
More features can be read [here](doc/features.md).
......@@ -82,10 +82,10 @@ int main() {
}
```
Note that this exmample did not handle potential errors.
Note that this example did not handle potential errors.
The following diagram shows the process.
![simpledom](doc/diagram/simpledom.png?raw=true)
More [examples](example/) are avaliable.
More [examples](example/) are available.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment