You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ph...@apache.org on 2018/02/12 18:09:04 UTC

[13/27] nifi-minifi-cpp git commit: MINIFICPP-114 Consolidate JSON API use to RapidJSON

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fd280b5c/thirdparty/rapidjson-1.1.0/doc/diagram/architecture.dot
----------------------------------------------------------------------
diff --git a/thirdparty/rapidjson-1.1.0/doc/diagram/architecture.dot b/thirdparty/rapidjson-1.1.0/doc/diagram/architecture.dot
new file mode 100644
index 0000000..c816c87
--- /dev/null
+++ b/thirdparty/rapidjson-1.1.0/doc/diagram/architecture.dot
@@ -0,0 +1,50 @@
+digraph {
+	compound=true
+	fontname="Inconsolata, Consolas"
+	fontsize=10
+	margin="0,0"
+	ranksep=0.2
+	nodesep=0.5
+	penwidth=0.5
+	colorscheme=spectral7
+	
+	node [shape=box, fontname="Inconsolata, Consolas", fontsize=10, penwidth=0.5, style=filled, fillcolor=white]
+	edge [fontname="Inconsolata, Consolas", fontsize=10, penwidth=0.5]
+
+	subgraph cluster1 {
+		margin="10,10"
+		labeljust="left"
+		label = "SAX"
+		style=filled
+		fillcolor=6
+
+		Reader -> Writer [style=invis]
+	}
+
+	subgraph cluster2 {
+		margin="10,10"
+		labeljust="left"
+		label = "DOM"
+		style=filled
+		fillcolor=7
+
+		Value
+		Document
+	}
+
+	Handler [label="<<concept>>\nHandler"]
+
+	{
+		edge [arrowtail=onormal, dir=back]
+		Value -> Document
+		Handler -> Document
+		Handler -> Writer
+	}
+
+	{
+		edge [arrowhead=vee, style=dashed, constraint=false]
+		Reader -> Handler [label="calls"]
+		Value -> Handler [label="calls"]
+		Document -> Reader [label="uses"]
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fd280b5c/thirdparty/rapidjson-1.1.0/doc/diagram/architecture.png
----------------------------------------------------------------------
diff --git a/thirdparty/rapidjson-1.1.0/doc/diagram/architecture.png b/thirdparty/rapidjson-1.1.0/doc/diagram/architecture.png
new file mode 100644
index 0000000..556c7e7
Binary files /dev/null and b/thirdparty/rapidjson-1.1.0/doc/diagram/architecture.png differ

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fd280b5c/thirdparty/rapidjson-1.1.0/doc/diagram/insituparsing.dot
----------------------------------------------------------------------
diff --git a/thirdparty/rapidjson-1.1.0/doc/diagram/insituparsing.dot b/thirdparty/rapidjson-1.1.0/doc/diagram/insituparsing.dot
new file mode 100644
index 0000000..eca0e38
--- /dev/null
+++ b/thirdparty/rapidjson-1.1.0/doc/diagram/insituparsing.dot
@@ -0,0 +1,65 @@
+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]
+
+	{
+		node [shape=record, fontsize="8", margin="0.04", height=0.2, color=gray]
+		oldjson [label="\{|\"|m|s|g|\"|:|\"|H|e|l|l|o|\\|n|W|o|r|l|d|!|\"|,|\"|\\|u|0|0|7|3|t|a|r|s|\"|:|1|0|\}", xlabel="Before Parsing"]
+		//newjson [label="\{|\"|<a>m|s|g|\\0|:|\"|<b>H|e|l|l|o|\\n|W|o|r|l|d|!|\\0|\"|,|\"|<c>s|t|a|r|s|\\0|t|a|r|s|:|1|0|\}", xlabel="After Parsing"]
+		newjson [shape=plaintext, label=<
+<table BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="2"><tr>
+<td>{</td>
+<td>"</td><td port="a">m</td><td>s</td><td>g</td><td bgcolor="yellow">\\0</td>
+<td>:</td>
+<td>"</td><td port="b">H</td><td>e</td><td>l</td><td>l</td><td>o</td><td bgcolor="yellow">\\n</td><td bgcolor="yellow">W</td><td bgcolor="yellow">o</td><td bgcolor="yellow">r</td><td bgcolor="yellow">l</td><td bgcolor="yellow">d</td><td bgcolor="yellow">!</td><td bgcolor="yellow">\\0</td><td>"</td>
+<td>,</td>
+<td>"</td><td port="c" bgcolor="yellow">s</td><td bgcolor="yellow">t</td><td bgcolor="yellow">a</td><td bgcolor="yellow">r</td><td bgcolor="yellow">s</td><td bgcolor="yellow">\\0</td><td>t</td><td>a</td><td>r</td><td>s</td>
+<td>:</td>
+<td>1</td><td>0</td>
+<td>}</td>
+</tr></table>
+>, xlabel="After Parsing"]
+	}
+
+	subgraph cluster1 {
+		margin="10,10"
+		labeljust="left"
+		label = "Document by In situ Parsing"
+		style=filled
+		fillcolor=gray95
+		node [shape=Mrecord, style=filled, colorscheme=spectral7]
+		
+		root [label="{object|}", fillcolor=3]
+
+		{			
+			msg [label="{string|<a>}", fillcolor=5]
+			helloworld [label="{string|<a>}", fillcolor=5]
+			stars [label="{string|<a>}", fillcolor=5]
+			ten [label="{number|10}", fillcolor=6]
+		}
+	}
+
+	oldjson -> root [label=" ParseInsitu()" lhead="cluster1"]
+	edge [arrowhead=vee]
+	root -> { msg; stars }
+
+	edge [arrowhead="none"]
+	msg  -> helloworld
+	stars -> ten
+
+	{
+		edge [arrowhead=vee, arrowtail=dot, arrowsize=0.5, dir=both, tailclip=false]
+		msg:a:c -> newjson:a
+		helloworld:a:c -> newjson:b
+		stars:a:c -> newjson:c
+	}
+
+	//oldjson -> newjson [style=invis]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fd280b5c/thirdparty/rapidjson-1.1.0/doc/diagram/insituparsing.png
----------------------------------------------------------------------
diff --git a/thirdparty/rapidjson-1.1.0/doc/diagram/insituparsing.png b/thirdparty/rapidjson-1.1.0/doc/diagram/insituparsing.png
new file mode 100644
index 0000000..4400c88
Binary files /dev/null and b/thirdparty/rapidjson-1.1.0/doc/diagram/insituparsing.png differ

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fd280b5c/thirdparty/rapidjson-1.1.0/doc/diagram/iterative-parser-states-diagram.dot
----------------------------------------------------------------------
diff --git a/thirdparty/rapidjson-1.1.0/doc/diagram/iterative-parser-states-diagram.dot b/thirdparty/rapidjson-1.1.0/doc/diagram/iterative-parser-states-diagram.dot
new file mode 100644
index 0000000..82ebfe1
--- /dev/null
+++ b/thirdparty/rapidjson-1.1.0/doc/diagram/iterative-parser-states-diagram.dot
@@ -0,0 +1,62 @@
+digraph {
+    fontname="Inconsolata, Consolas"
+    fontsize=10
+    margin="0,0"
+    penwidth=0.0
+    
+    node [fontname="Inconsolata, Consolas", fontsize=10, penwidth=0.5]
+    edge [fontname="Inconsolata, Consolas", fontsize=10, penwidth=0.5]
+
+    node [shape = doublecircle]; Start; Finish;
+    node [shape = box; style = "rounded, filled"; fillcolor=white ];
+
+    Start -> ArrayInitial [label=" ["];
+    Start -> ObjectInitial [label=" {"];
+
+    subgraph clusterArray {
+        margin="10,10"
+        style=filled
+        fillcolor=gray95
+        label = "Array"
+        
+        ArrayInitial; Element; ElementDelimiter; ArrayFinish;
+    }
+
+    subgraph clusterObject {
+        margin="10,10"
+        style=filled
+        fillcolor=gray95
+        label = "Object"
+
+        ObjectInitial; MemberKey; KeyValueDelimiter; MemberValue; MemberDelimiter; ObjectFinish;
+    }
+
+    ArrayInitial -> ArrayInitial [label="["];
+    ArrayInitial -> ArrayFinish [label=" ]"];
+    ArrayInitial -> ObjectInitial [label="{", constraint=false];
+    ArrayInitial -> Element [label="string\nfalse\ntrue\nnull\nnumber"];
+
+    Element -> ArrayFinish [label="]"];
+    Element -> ElementDelimiter [label=","];
+
+    ElementDelimiter -> ArrayInitial [label=" ["];
+    ElementDelimiter -> ObjectInitial [label="{"];
+    ElementDelimiter -> Element [label="string\nfalse\ntrue\nnull\nnumber"];
+
+    ObjectInitial -> ObjectFinish [label=" }"];
+    ObjectInitial -> MemberKey [label=" string "];
+
+    MemberKey -> KeyValueDelimiter [label=":"];
+
+    KeyValueDelimiter -> ArrayInitial [label="["];
+    KeyValueDelimiter -> ObjectInitial [label=" {"];
+    KeyValueDelimiter -> MemberValue [label=" string\n false\n true\n null\n number"];
+
+    MemberValue -> ObjectFinish [label="}"];
+    MemberValue -> MemberDelimiter [label=","];
+
+    MemberDelimiter -> MemberKey [label=" string "];
+
+    ArrayFinish -> Finish;
+    ObjectFinish -> Finish;
+}

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fd280b5c/thirdparty/rapidjson-1.1.0/doc/diagram/iterative-parser-states-diagram.png
----------------------------------------------------------------------
diff --git a/thirdparty/rapidjson-1.1.0/doc/diagram/iterative-parser-states-diagram.png b/thirdparty/rapidjson-1.1.0/doc/diagram/iterative-parser-states-diagram.png
new file mode 100644
index 0000000..f315494
Binary files /dev/null and b/thirdparty/rapidjson-1.1.0/doc/diagram/iterative-parser-states-diagram.png differ

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fd280b5c/thirdparty/rapidjson-1.1.0/doc/diagram/makefile
----------------------------------------------------------------------
diff --git a/thirdparty/rapidjson-1.1.0/doc/diagram/makefile b/thirdparty/rapidjson-1.1.0/doc/diagram/makefile
new file mode 100644
index 0000000..3483977
--- /dev/null
+++ b/thirdparty/rapidjson-1.1.0/doc/diagram/makefile
@@ -0,0 +1,8 @@
+%.pdf: %.dot
+	dot $< -Tpdf -o $@
+
+%.png: %.dot
+	dot $< -Tpng -o $@
+
+DOTFILES = $(basename $(wildcard *.dot))
+all: $(addsuffix .png, $(DOTFILES)) $(addsuffix .pdf, $(DOTFILES))

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fd280b5c/thirdparty/rapidjson-1.1.0/doc/diagram/move1.dot
----------------------------------------------------------------------
diff --git a/thirdparty/rapidjson-1.1.0/doc/diagram/move1.dot b/thirdparty/rapidjson-1.1.0/doc/diagram/move1.dot
new file mode 100644
index 0000000..a7c1464
--- /dev/null
+++ b/thirdparty/rapidjson-1.1.0/doc/diagram/move1.dot
@@ -0,0 +1,47 @@
+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

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fd280b5c/thirdparty/rapidjson-1.1.0/doc/diagram/move1.png
----------------------------------------------------------------------
diff --git a/thirdparty/rapidjson-1.1.0/doc/diagram/move1.png b/thirdparty/rapidjson-1.1.0/doc/diagram/move1.png
new file mode 100644
index 0000000..ab322d0
Binary files /dev/null and b/thirdparty/rapidjson-1.1.0/doc/diagram/move1.png differ

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fd280b5c/thirdparty/rapidjson-1.1.0/doc/diagram/move2.dot
----------------------------------------------------------------------
diff --git a/thirdparty/rapidjson-1.1.0/doc/diagram/move2.dot b/thirdparty/rapidjson-1.1.0/doc/diagram/move2.dot
new file mode 100644
index 0000000..7037ea6
--- /dev/null
+++ b/thirdparty/rapidjson-1.1.0/doc/diagram/move2.dot
@@ -0,0 +1,62 @@
+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

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fd280b5c/thirdparty/rapidjson-1.1.0/doc/diagram/move2.png
----------------------------------------------------------------------
diff --git a/thirdparty/rapidjson-1.1.0/doc/diagram/move2.png b/thirdparty/rapidjson-1.1.0/doc/diagram/move2.png
new file mode 100644
index 0000000..8d4fc5b
Binary files /dev/null and b/thirdparty/rapidjson-1.1.0/doc/diagram/move2.png differ

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fd280b5c/thirdparty/rapidjson-1.1.0/doc/diagram/move3.dot
----------------------------------------------------------------------
diff --git a/thirdparty/rapidjson-1.1.0/doc/diagram/move3.dot b/thirdparty/rapidjson-1.1.0/doc/diagram/move3.dot
new file mode 100644
index 0000000..c197b99
--- /dev/null
+++ b/thirdparty/rapidjson-1.1.0/doc/diagram/move3.dot
@@ -0,0 +1,60 @@
+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

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fd280b5c/thirdparty/rapidjson-1.1.0/doc/diagram/move3.png
----------------------------------------------------------------------
diff --git a/thirdparty/rapidjson-1.1.0/doc/diagram/move3.png b/thirdparty/rapidjson-1.1.0/doc/diagram/move3.png
new file mode 100644
index 0000000..558470f
Binary files /dev/null and b/thirdparty/rapidjson-1.1.0/doc/diagram/move3.png differ

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fd280b5c/thirdparty/rapidjson-1.1.0/doc/diagram/normalparsing.dot
----------------------------------------------------------------------
diff --git a/thirdparty/rapidjson-1.1.0/doc/diagram/normalparsing.dot b/thirdparty/rapidjson-1.1.0/doc/diagram/normalparsing.dot
new file mode 100644
index 0000000..b15941b
--- /dev/null
+++ b/thirdparty/rapidjson-1.1.0/doc/diagram/normalparsing.dot
@@ -0,0 +1,56 @@
+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]
+
+	{
+		node [shape=record, fontsize="8", margin="0.04", height=0.2, color=gray]
+		normaljson [label="\{|\"|m|s|g|\"|:|\"|H|e|l|l|o|\\|n|W|o|r|l|d|!|\"|,|\"|\\|u|0|0|7|3|t|a|r|s\"|:|1|0|\}"]
+
+		{
+			rank = same
+			msgstring  [label="m|s|g|\\0"]
+			helloworldstring  [label="H|e|l|l|o|\\n|W|o|r|l|d|!|\\0"]
+			starsstring [label="s|t|a|r|s\\0"]
+		}
+	}
+
+	subgraph cluster1 {
+		margin="10,10"
+		labeljust="left"
+		label = "Document by Normal Parsing"
+		style=filled
+		fillcolor=gray95
+		node [shape=Mrecord, style=filled, colorscheme=spectral7]
+		
+		root [label="{object|}", fillcolor=3]
+
+		{			
+			msg [label="{string|<a>}", fillcolor=5]
+			helloworld [label="{string|<a>}", fillcolor=5]
+			stars [label="{string|<a>}", fillcolor=5]
+			ten [label="{number|10}", fillcolor=6]
+		}
+	}
+
+	normaljson -> root [label=" Parse()" lhead="cluster1"]
+	edge [arrowhead=vee]
+	root -> { msg; stars }
+
+	edge [arrowhead="none"]
+	msg  -> helloworld
+	stars -> ten
+
+	edge [arrowhead=vee, arrowtail=dot, arrowsize=0.5, dir=both, tailclip=false]
+	msg:a:c -> msgstring:w
+	helloworld:a:c -> helloworldstring:w
+	stars:a:c -> starsstring:w
+
+	msgstring -> helloworldstring -> starsstring [style=invis]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fd280b5c/thirdparty/rapidjson-1.1.0/doc/diagram/normalparsing.png
----------------------------------------------------------------------
diff --git a/thirdparty/rapidjson-1.1.0/doc/diagram/normalparsing.png b/thirdparty/rapidjson-1.1.0/doc/diagram/normalparsing.png
new file mode 100644
index 0000000..702512c
Binary files /dev/null and b/thirdparty/rapidjson-1.1.0/doc/diagram/normalparsing.png differ

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fd280b5c/thirdparty/rapidjson-1.1.0/doc/diagram/simpledom.dot
----------------------------------------------------------------------
diff --git a/thirdparty/rapidjson-1.1.0/doc/diagram/simpledom.dot b/thirdparty/rapidjson-1.1.0/doc/diagram/simpledom.dot
new file mode 100644
index 0000000..959cdbb
--- /dev/null
+++ b/thirdparty/rapidjson-1.1.0/doc/diagram/simpledom.dot
@@ -0,0 +1,54 @@
+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]
+
+	{
+		node [shape=record, fontsize="8", margin="0.04", height=0.2, color=gray]
+		srcjson [label="\{|\"|p|r|o|j|e|c|t|\"|:|\"|r|a|p|i|d|j|s|o|n|\"|,|\"|s|t|a|r|s|\"|:|1|0|\}"]
+		dstjson [label="\{|\"|p|r|o|j|e|c|t|\"|:|\"|r|a|p|i|d|j|s|o|n|\"|,|\"|s|t|a|r|s|\"|:|1|1|\}"]
+	}
+
+	{
+		node [shape="box", style="filled", fillcolor="gray95"]
+		Document2 [label="(Modified) Document"]
+		Writer
+	}
+
+	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]
+
+		{			
+			project [label="{string|\"project\"}", fillcolor=5]
+			rapidjson [label="{string|\"rapidjson\"}", fillcolor=5]
+			stars [label="{string|\"stars\"}", fillcolor=5]
+			ten [label="{number|10}", fillcolor=6]
+		}
+
+		edge [arrowhead=vee]
+		root -> { project; stars }
+
+		edge [arrowhead="none"]
+		project -> rapidjson
+		stars -> ten
+	}
+
+	srcjson -> root [label=" Parse()", lhead="cluster1"]
+
+	ten -> Document2 [label=" Increase \"stars\"", ltail="cluster1" ]
+	Document2  -> Writer [label=" Traverse DOM by Accept()"]
+	Writer -> dstjson [label=" Output to StringBuffer"]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fd280b5c/thirdparty/rapidjson-1.1.0/doc/diagram/simpledom.png
----------------------------------------------------------------------
diff --git a/thirdparty/rapidjson-1.1.0/doc/diagram/simpledom.png b/thirdparty/rapidjson-1.1.0/doc/diagram/simpledom.png
new file mode 100644
index 0000000..38d9c5d
Binary files /dev/null and b/thirdparty/rapidjson-1.1.0/doc/diagram/simpledom.png differ

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fd280b5c/thirdparty/rapidjson-1.1.0/doc/diagram/tutorial.dot
----------------------------------------------------------------------
diff --git a/thirdparty/rapidjson-1.1.0/doc/diagram/tutorial.dot b/thirdparty/rapidjson-1.1.0/doc/diagram/tutorial.dot
new file mode 100644
index 0000000..138ddc3
--- /dev/null
+++ b/thirdparty/rapidjson-1.1.0/doc/diagram/tutorial.dot
@@ -0,0 +1,58 @@
+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

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fd280b5c/thirdparty/rapidjson-1.1.0/doc/diagram/tutorial.png
----------------------------------------------------------------------
diff --git a/thirdparty/rapidjson-1.1.0/doc/diagram/tutorial.png b/thirdparty/rapidjson-1.1.0/doc/diagram/tutorial.png
new file mode 100644
index 0000000..8a12924
Binary files /dev/null and b/thirdparty/rapidjson-1.1.0/doc/diagram/tutorial.png differ

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fd280b5c/thirdparty/rapidjson-1.1.0/doc/diagram/utilityclass.dot
----------------------------------------------------------------------
diff --git a/thirdparty/rapidjson-1.1.0/doc/diagram/utilityclass.dot b/thirdparty/rapidjson-1.1.0/doc/diagram/utilityclass.dot
new file mode 100644
index 0000000..1492a8a
--- /dev/null
+++ b/thirdparty/rapidjson-1.1.0/doc/diagram/utilityclass.dot
@@ -0,0 +1,73 @@
+digraph {
+	rankdir=LR
+	compound=true
+	fontname="Inconsolata, Consolas"
+	fontsize=10
+	margin="0,0"
+	ranksep=0.3
+	nodesep=0.15
+	penwidth=0.5
+	colorscheme=spectral7
+	
+	node [shape=box, fontname="Inconsolata, Consolas", fontsize=10, penwidth=0.5, style=filled, fillcolor=white]
+	edge [fontname="Inconsolata, Consolas", fontsize=10, penwidth=0.5]
+
+	subgraph cluster0 {
+		style=filled
+		fillcolor=4
+
+		Encoding [label="<<concept>>\nEncoding"]
+
+		edge [arrowtail=onormal, dir=back]
+		Encoding -> { UTF8; UTF16; UTF32; ASCII; AutoUTF }
+		UTF16 -> { UTF16LE; UTF16BE }
+		UTF32 -> { UTF32LE; UTF32BE }
+	}
+
+	subgraph cluster1 {
+		style=filled
+		fillcolor=5
+
+		Stream [label="<<concept>>\nStream"]
+		InputByteStream [label="<<concept>>\nInputByteStream"]
+		OutputByteStream [label="<<concept>>\nOutputByteStream"]
+
+		edge [arrowtail=onormal, dir=back]
+		Stream -> { 
+			StringStream; InsituStringStream; StringBuffer; 
+			EncodedInputStream; EncodedOutputStream; 
+			AutoUTFInputStream; AutoUTFOutputStream 
+			InputByteStream; OutputByteStream
+		}
+
+		InputByteStream ->	{ MemoryStream; FlieReadStream }
+		OutputByteStream -> { MemoryBuffer; FileWriteStream } 
+	}
+
+	subgraph cluster2 {
+		style=filled
+		fillcolor=3
+
+		Allocator [label="<<concept>>\nAllocator"]
+
+		edge [arrowtail=onormal, dir=back]
+		Allocator -> { CrtAllocator; MemoryPoolAllocator }
+	}
+
+	{
+		edge [arrowtail=odiamond, arrowhead=vee, dir=both]
+		EncodedInputStream -> InputByteStream
+		EncodedOutputStream -> OutputByteStream
+		AutoUTFInputStream -> InputByteStream
+		AutoUTFOutputStream -> OutputByteStream
+		MemoryPoolAllocator -> Allocator [label="base", tailport=s]
+	}
+
+	{
+		edge [arrowhead=vee, style=dashed]
+		AutoUTFInputStream -> AutoUTF
+		AutoUTFOutputStream -> AutoUTF
+	}
+
+	//UTF32LE -> Stream [style=invis]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fd280b5c/thirdparty/rapidjson-1.1.0/doc/diagram/utilityclass.png
----------------------------------------------------------------------
diff --git a/thirdparty/rapidjson-1.1.0/doc/diagram/utilityclass.png b/thirdparty/rapidjson-1.1.0/doc/diagram/utilityclass.png
new file mode 100644
index 0000000..ce029a4
Binary files /dev/null and b/thirdparty/rapidjson-1.1.0/doc/diagram/utilityclass.png differ

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fd280b5c/thirdparty/rapidjson-1.1.0/doc/dom.md
----------------------------------------------------------------------
diff --git a/thirdparty/rapidjson-1.1.0/doc/dom.md b/thirdparty/rapidjson-1.1.0/doc/dom.md
new file mode 100644
index 0000000..6c541fe
--- /dev/null
+++ b/thirdparty/rapidjson-1.1.0/doc/dom.md
@@ -0,0 +1,280 @@
+# DOM
+
+Document Object Model(DOM) is an in-memory representation of JSON for query and manipulation. The basic usage of DOM is described in [Tutorial](doc/tutorial.md). This section will describe some details and more advanced usages.
+
+[TOC]
+
+# Template {#Template}
+
+In the tutorial,  `Value` and `Document` was used. Similarly to `std::string`, these are actually `typedef` of template classes:
+
+~~~~~~~~~~cpp
+namespace rapidjson {
+
+template <typename Encoding, typename Allocator = MemoryPoolAllocator<> >
+class GenericValue {
+    // ...
+};
+
+template <typename Encoding, typename Allocator = MemoryPoolAllocator<> >
+class GenericDocument : public GenericValue<Encoding, Allocator> {
+    // ...
+};
+
+typedef GenericValue<UTF8<> > Value;
+typedef GenericDocument<UTF8<> > Document;
+
+} // namespace rapidjson
+~~~~~~~~~~
+
+User can customize these template parameters.
+
+## Encoding {#Encoding}
+
+The `Encoding` parameter specifies the encoding of JSON String value in memory. Possible options are `UTF8`, `UTF16`, `UTF32`. Note that, these 3 types are also template class. `UTF8<>` is `UTF8<char>`, which means using char to store the characters. You may refer to [Encoding](doc/encoding.md) for details.
+
+Suppose a Windows application would query localization strings stored in JSON files. Unicode-enabled functions in Windows use UTF-16 (wide character) encoding. No matter what encoding was used in JSON files, we can store the strings in UTF-16 in memory.
+
+~~~~~~~~~~cpp
+using namespace rapidjson;
+
+typedef GenericDocument<UTF16<> > WDocument;
+typedef GenericValue<UTF16<> > WValue;
+
+FILE* fp = fopen("localization.json", "rb"); // non-Windows use "r"
+
+char readBuffer[256];
+FileReadStream bis(fp, readBuffer, sizeof(readBuffer));
+
+AutoUTFInputStream<unsigned, FileReadStream> eis(bis);  // wraps bis into eis
+
+WDocument d;
+d.ParseStream<0, AutoUTF<unsigned> >(eis);
+
+const WValue locale(L"ja"); // Japanese
+
+MessageBoxW(hWnd, d[locale].GetString(), L"Test", MB_OK);
+~~~~~~~~~~
+
+## Allocator {#Allocator}
+
+The `Allocator` defines which allocator class is used when allocating/deallocating memory for `Document`/`Value`. `Document` owns, or references to an `Allocator` instance. On the other hand, `Value` does not do so, in order to reduce memory consumption.
+
+The default allocator used in `GenericDocument` is `MemoryPoolAllocator`. This allocator actually allocate memory sequentially, and cannot deallocate one by one. This is very suitable when parsing a JSON into a DOM tree.
+
+Another allocator is `CrtAllocator`, of which CRT is short for C RunTime library. This allocator simply calls the standard `malloc()`/`realloc()`/`free()`. When there is a lot of add and remove operations, this allocator may be preferred. But this allocator is far less efficient than `MemoryPoolAllocator`.
+
+# Parsing {#Parsing}
+
+`Document` provides several functions for parsing. In below, (1) is the fundamental function, while the others are helpers which call (1).
+
+~~~~~~~~~~cpp
+using namespace rapidjson;
+
+// (1) Fundamental
+template <unsigned parseFlags, typename SourceEncoding, typename InputStream>
+GenericDocument& GenericDocument::ParseStream(InputStream& is);
+
+// (2) Using the same Encoding for stream
+template <unsigned parseFlags, typename InputStream>
+GenericDocument& GenericDocument::ParseStream(InputStream& is);
+
+// (3) Using default parse flags
+template <typename InputStream>
+GenericDocument& GenericDocument::ParseStream(InputStream& is);
+
+// (4) In situ parsing
+template <unsigned parseFlags>
+GenericDocument& GenericDocument::ParseInsitu(Ch* str);
+
+// (5) In situ parsing, using default parse flags
+GenericDocument& GenericDocument::ParseInsitu(Ch* str);
+
+// (6) Normal parsing of a string
+template <unsigned parseFlags, typename SourceEncoding>
+GenericDocument& GenericDocument::Parse(const Ch* str);
+
+// (7) Normal parsing of a string, using same Encoding of Document
+template <unsigned parseFlags>
+GenericDocument& GenericDocument::Parse(const Ch* str);
+
+// (8) Normal parsing of a string, using default parse flags
+GenericDocument& GenericDocument::Parse(const Ch* str);
+~~~~~~~~~~
+
+The examples of [tutorial](doc/tutorial.md) uses (8) for normal parsing of string. The examples of [stream](doc/stream.md) uses the first three. *In situ* parsing will be described soon.
+
+The `parseFlags` are combination of the following bit-flags:
+
+Parse flags                   | Meaning
+------------------------------|-----------------------------------
+`kParseNoFlags`               | No flag is set.
+`kParseDefaultFlags`          | Default parse flags. It is equal to macro `RAPIDJSON_PARSE_DEFAULT_FLAGS`, which is defined as `kParseNoFlags`.
+`kParseInsituFlag`            | In-situ(destructive) parsing.
+`kParseValidateEncodingFlag`  | Validate encoding of JSON strings.
+`kParseIterativeFlag`         | Iterative(constant complexity in terms of function call stack size) parsing.
+`kParseStopWhenDoneFlag`      | After parsing a complete JSON root from stream, stop further processing the rest of stream. When this flag is used, parser will not generate `kParseErrorDocumentRootNotSingular` error. Using this flag for parsing multiple JSONs in the same stream.
+`kParseFullPrecisionFlag`     | Parse number in full precision (slower). If this flag is not set, the normal precision (faster) is used. Normal precision has maximum 3 [ULP](http://en.wikipedia.org/wiki/Unit_in_the_last_place) error.
+`kParseCommentsFlag`          | Allow one-line `// ...` and multi-line `/* ... */` comments (relaxed JSON syntax).
+`kParseNumbersAsStringsFlag`  | Parse numerical type values as strings.
+`kParseTrailingCommasFlag`    | Allow trailing commas at the end of objects and arrays (relaxed JSON syntax).
+`kParseNanAndInfFlag`         | Allow parsing `NaN`, `Inf`, `Infinity`, `-Inf` and `-Infinity` as `double` values (relaxed JSON syntax).
+
+By using a non-type template parameter, instead of a function parameter, C++ compiler can generate code which is optimized for specified combinations, improving speed, and reducing code size (if only using a single specialization). The downside is the flags needed to be determined in compile-time.
+
+The `SourceEncoding` parameter defines what encoding is in the stream. This can be differed to the `Encoding` of the `Document`. See [Transcoding and Validation](#TranscodingAndValidation) section for details.
+
+And the `InputStream` is type of input stream.
+
+## Parse Error {#ParseError}
+
+When the parse processing succeeded, the `Document` contains the parse results. When there is an error, the original DOM is *unchanged*. And the error state of parsing can be obtained by `bool HasParseError()`,  `ParseErrorCode GetParseError()` and `size_t GetParseOffset()`.
+
+Parse Error Code                            | Description
+--------------------------------------------|---------------------------------------------------
+`kParseErrorNone`                           | No error.
+`kParseErrorDocumentEmpty`                  | The document is empty.
+`kParseErrorDocumentRootNotSingular`        | The document root must not follow by other values.
+`kParseErrorValueInvalid`                   | Invalid value.
+`kParseErrorObjectMissName`                 | Missing a name for object member.
+`kParseErrorObjectMissColon`                | Missing a colon after a name of object member.
+`kParseErrorObjectMissCommaOrCurlyBracket`  | Missing a comma or `}` after an object member.
+`kParseErrorArrayMissCommaOrSquareBracket`  | Missing a comma or `]` after an array element.
+`kParseErrorStringUnicodeEscapeInvalidHex`  | Incorrect hex digit after `\\u` escape in string.
+`kParseErrorStringUnicodeSurrogateInvalid`  | The surrogate pair in string is invalid.
+`kParseErrorStringEscapeInvalid`            | Invalid escape character in string.
+`kParseErrorStringMissQuotationMark`        | Missing a closing quotation mark in string.
+`kParseErrorStringInvalidEncoding`          | Invalid encoding in string.
+`kParseErrorNumberTooBig`                   | Number too big to be stored in `double`.
+`kParseErrorNumberMissFraction`             | Miss fraction part in number.
+`kParseErrorNumberMissExponent`             | Miss exponent in number.
+
+The offset of error is defined as the character number from beginning of stream. Currently RapidJSON does not keep track of line number.
+
+To get an error message, RapidJSON provided a English messages in `rapidjson/error/en.h`. User can customize it for other locales, or use a custom localization system.
+
+Here shows an example of parse error handling.
+
+~~~~~~~~~~cpp
+#include "rapidjson/document.h"
+#include "rapidjson/error/en.h"
+
+// ...
+Document d;
+if (d.Parse(json).HasParseError()) {
+    fprintf(stderr, "\nError(offset %u): %s\n", 
+        (unsigned)d.GetErrorOffset(),
+        GetParseError_En(d.GetParseError()));
+    // ...
+}
+~~~~~~~~~~
+
+## In Situ Parsing {#InSituParsing}
+
+From [Wikipedia](http://en.wikipedia.org/wiki/In_situ):
+
+> *In situ* ... is a Latin phrase that translates literally to "on site" or "in position". It means "locally", "on site", "on the premises" or "in place" to describe an event where it takes place, and is used in many different contexts.
+> ...
+> (In computer science) An algorithm is said to be an in situ algorithm, or in-place algorithm, if the extra amount of memory required to execute the algorithm is O(1), that is, does not exceed a constant no matter how large the input. For example, heapsort is an in situ sorting algorithm.
+
+In normal parsing process, a large overhead is to decode JSON strings and copy them to other buffers. *In situ* parsing decodes those JSON string at the place where it is stored. It is possible in JSON because the length of decoded string is always shorter than or equal to the one in JSON. In this context, decoding a JSON string means to process the escapes, such as `"\n"`, `"\u1234"`, etc., and add a null terminator (`'\0'`)at the end of string.
+
+The following diagrams compare normal and *in situ* parsing. The JSON string values contain pointers to the decoded string.
+
+![normal parsing](diagram/normalparsing.png)
+
+In normal parsing, the decoded string are copied to freshly allocated buffers. `"\\n"` (2 characters) is decoded as `"\n"` (1 character). `"\\u0073"` (6 characters) is decoded as `"s"` (1 character).
+
+![instiu parsing](diagram/insituparsing.png)
+
+*In situ* parsing just modified the original JSON. Updated characters are highlighted in the diagram. If the JSON string does not contain escape character, such as `"msg"`, the parsing process merely replace the closing double quotation mark with a null character.
+
+Since *in situ* parsing modify the input, the parsing API needs `char*` instead of `const char*`.
+
+~~~~~~~~~~cpp
+// Read whole file into a buffer
+FILE* fp = fopen("test.json", "r");
+fseek(fp, 0, SEEK_END);
+size_t filesize = (size_t)ftell(fp);
+fseek(fp, 0, SEEK_SET);
+char* buffer = (char*)malloc(filesize + 1);
+size_t readLength = fread(buffer, 1, filesize, fp);
+buffer[readLength] = '\0';
+fclose(fp);
+
+// In situ parsing the buffer into d, buffer will also be modified
+Document d;
+d.ParseInsitu(buffer);
+
+// Query/manipulate the DOM here...
+
+free(buffer);
+// Note: At this point, d may have dangling pointers pointed to the deallocated buffer.
+~~~~~~~~~~
+
+The JSON strings are marked as const-string. But they may not be really "constant". The life cycle of it depends on the JSON buffer.
+
+In situ parsing minimizes allocation overheads and memory copying. Generally this improves cache coherence, which is an important factor of performance in modern computer.
+
+There are some limitations of *in situ* parsing:
+
+1. The whole JSON is in memory.
+2. The source encoding in stream and target encoding in document must be the same.
+3. The buffer need to be retained until the document is no longer used.
+4. If the DOM need to be used for long period after parsing, and there are few JSON strings in the DOM, retaining the buffer may be a memory waste.
+
+*In situ* parsing is mostly suitable for short-term JSON that only need to be processed once, and then be released from memory. In practice, these situation is very common, for example, deserializing JSON to C++ objects, processing web requests represented in JSON, etc.
+
+## Transcoding and Validation {#TranscodingAndValidation}
+
+RapidJSON supports conversion between Unicode formats (officially termed UCS Transformation Format) internally. During DOM parsing, the source encoding of the stream can be different from the encoding of the DOM. For example, the source stream contains a UTF-8 JSON, while the DOM is using UTF-16 encoding. There is an example code in [EncodedInputStream](doc/stream.md).
+
+When writing a JSON from DOM to output stream, transcoding can also be used. An example is in [EncodedOutputStream](doc/stream.md).
+
+During transcoding, the source string is decoded to into Unicode code points, and then the code points are encoded in the target format. During decoding, it will validate the byte sequence in the source string. If it is not a valid sequence, the parser will be stopped with `kParseErrorStringInvalidEncoding` error.
+
+When the source encoding of stream is the same as encoding of DOM, by default, the parser will *not* validate the sequence. User may use `kParseValidateEncodingFlag` to force validation.
+
+# Techniques {#Techniques}
+
+Some techniques about using DOM API is discussed here.
+
+## DOM as SAX Event Publisher
+
+In RapidJSON, stringifying a DOM with `Writer` may be look a little bit weired.
+
+~~~~~~~~~~cpp
+// ...
+Writer<StringBuffer> writer(buffer);
+d.Accept(writer);
+~~~~~~~~~~
+
+Actually, `Value::Accept()` is responsible for publishing SAX events about the value to the handler. With this design, `Value` and `Writer` are decoupled. `Value` can generate SAX events, and `Writer` can handle those events.
+
+User may create custom handlers for transforming the DOM into other formats. For example, a handler which converts the DOM into XML.
+
+For more about SAX events and handler, please refer to [SAX](doc/sax.md).
+
+## User Buffer {#UserBuffer}
+
+Some applications may try to avoid memory allocations whenever possible.
+
+`MemoryPoolAllocator` can support this by letting user to provide a buffer. The buffer can be on the program stack, or a "scratch buffer" which is statically allocated (a static/global array) for storing temporary data.
+
+`MemoryPoolAllocator` will use the user buffer to satisfy allocations. When the user buffer is used up, it will allocate a chunk of memory from the base allocator (by default the `CrtAllocator`).
+
+Here is an example of using stack memory. The first allocator is for storing values, while the second allocator is for storing temporary data during parsing.
+
+~~~~~~~~~~cpp
+typedef GenericDocument<UTF8<>, MemoryPoolAllocator<>, MemoryPoolAllocator<>> DocumentType;
+char valueBuffer[4096];
+char parseBuffer[1024];
+MemoryPoolAllocator<> valueAllocator(valueBuffer, sizeof(valueBuffer));
+MemoryPoolAllocator<> parseAllocator(parseBuffer, sizeof(parseBuffer));
+DocumentType d(&valueAllocator, sizeof(parseBuffer), &parseAllocator);
+d.Parse(json);
+~~~~~~~~~~
+
+If the total size of allocation is less than 4096+1024 bytes during parsing, this code does not invoke any heap allocation (via `new` or `malloc()`) at all.
+
+User can query the current memory consumption in bytes via `MemoryPoolAllocator::Size()`. And then user can determine a suitable size of user buffer.

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fd280b5c/thirdparty/rapidjson-1.1.0/doc/dom.zh-cn.md
----------------------------------------------------------------------
diff --git a/thirdparty/rapidjson-1.1.0/doc/dom.zh-cn.md b/thirdparty/rapidjson-1.1.0/doc/dom.zh-cn.md
new file mode 100644
index 0000000..d93f603
--- /dev/null
+++ b/thirdparty/rapidjson-1.1.0/doc/dom.zh-cn.md
@@ -0,0 +1,284 @@
+# DOM
+
+文档对象模型(Document Object Model, DOM)是一种罝于内存中的 JSON 表示方式,以供查询及操作。我们己于 [教程](doc/tutorial.zh-cn.md) 中介绍了 DOM 的基本用法,本节将讲述一些细节及高级用法。
+
+[TOC]
+
+# 模板 {#Template}
+
+教程中使用了 `Value` 和 `Document` 类型。与 `std::string` 相似,这些类型其实是两个模板类的 `typedef`:
+
+~~~~~~~~~~cpp
+namespace rapidjson {
+
+template <typename Encoding, typename Allocator = MemoryPoolAllocator<> >
+class GenericValue {
+    // ...
+};
+
+template <typename Encoding, typename Allocator = MemoryPoolAllocator<> >
+class GenericDocument : public GenericValue<Encoding, Allocator> {
+    // ...
+};
+
+typedef GenericValue<UTF8<> > Value;
+typedef GenericDocument<UTF8<> > Document;
+
+} // namespace rapidjson
+~~~~~~~~~~
+
+使用者可以自定义这些模板参数。
+
+## 编码 {#Encoding}
+
+`Encoding` 参数指明在内存中的 JSON String 使用哪种编码。可行的选项有 `UTF8`、`UTF16`、`UTF32`。要注意这 3 个类型其实也是模板类。`UTF8<>` 等同 `UTF8<char>`,这代表它使用 `char` 来存储字符串。更多细节可以参考 [编码](doc/encoding.zh-cn.md)。
+
+这里是一个例子。假设一个 Windows 应用软件希望查询存储于 JSON 中的本地化字符串。Windows 中含 Unicode 的函数使用 UTF-16(宽字符)编码。无论 JSON 文件使用哪种编码,我们都可以把字符串以 UTF-16 形式存储在内存。
+
+~~~~~~~~~~cpp
+using namespace rapidjson;
+
+typedef GenericDocument<UTF16<> > WDocument;
+typedef GenericValue<UTF16<> > WValue;
+
+FILE* fp = fopen("localization.json", "rb"); // 非 Windows 平台使用 "r"
+
+char readBuffer[256];
+FileReadStream bis(fp, readBuffer, sizeof(readBuffer));
+
+AutoUTFInputStream<unsigned, FileReadStream> eis(bis);  // 包装 bis 成 eis
+
+WDocument d;
+d.ParseStream<0, AutoUTF<unsigned> >(eis);
+
+const WValue locale(L"ja"); // Japanese
+
+MessageBoxW(hWnd, d[locale].GetString(), L"Test", MB_OK);
+~~~~~~~~~~
+
+## 分配器 {#Allocator}
+
+`Allocator` 定义当 `Document`/`Value` 分配或释放内存时使用那个分配类。`Document` 拥有或引用到一个 `Allocator` 实例。而为了节省内存,`Value` 没有这么做。
+
+`GenericDocument` 的缺省分配器是 `MemoryPoolAllocator`。此分配器实际上会顺序地分配内存,并且不能逐一释放。当要解析一个 JSON 并生成 DOM,这种分配器是非常合适的。
+
+RapidJSON 还提供另一个分配器 `CrtAllocator`,当中 CRT 是 C 运行库(C RunTime library)的缩写。此分配器简单地读用标准的 `malloc()`/`realloc()`/`free()`。当我们需要许多增减操作,这种分配器会更为适合。然而这种分配器远远比 `MemoryPoolAllocator` 低效。
+
+# 解析 {#Parsing}
+
+`Document` 提供几个解析函数。以下的 (1) 是根本的函数,其他都是调用 (1) 的协助函数。
+
+~~~~~~~~~~cpp
+using namespace rapidjson;
+
+// (1) 根本
+template <unsigned parseFlags, typename SourceEncoding, typename InputStream>
+GenericDocument& GenericDocument::ParseStream(InputStream& is);
+
+// (2) 使用流的编码
+template <unsigned parseFlags, typename InputStream>
+GenericDocument& GenericDocument::ParseStream(InputStream& is);
+
+// (3) 使用缺省标志
+template <typename InputStream>
+GenericDocument& GenericDocument::ParseStream(InputStream& is);
+
+// (4) 原位解析
+template <unsigned parseFlags>
+GenericDocument& GenericDocument::ParseInsitu(Ch* str);
+
+// (5) 原位解析,使用缺省标志
+GenericDocument& GenericDocument::ParseInsitu(Ch* str);
+
+// (6) 正常解析一个字符串
+template <unsigned parseFlags, typename SourceEncoding>
+GenericDocument& GenericDocument::Parse(const Ch* str);
+
+// (7) 正常解析一个字符串,使用 Document 的编码
+template <unsigned parseFlags>
+GenericDocument& GenericDocument::Parse(const Ch* str);
+
+// (8) 正常解析一个字符串,使用缺省标志
+GenericDocument& GenericDocument::Parse(const Ch* str);
+~~~~~~~~~~
+
+[教程](doc/tutorial.zh-cn.md) 中的例使用 (8) 去正常解析字符串。而 [流](doc/stream.zh-cn.md) 的例子使用前 3 个函数。我们将稍后介绍原位(*In situ*) 解析。
+
+`parseFlags` 是以下位标置的组合:
+
+解析位标志                    | 意义
+------------------------------|-----------------------------------
+`kParseNoFlags`               | 没有任何标志。
+`kParseDefaultFlags`          | 缺省的解析选项。它等于 `RAPIDJSON_PARSE_DEFAULT_FLAGS` 宏,此宏定义为 `kParseNoFlags`。
+`kParseInsituFlag`            | 原位(破坏性)解析。
+`kParseValidateEncodingFlag`  | 校验 JSON 字符串的编码。
+`kParseIterativeFlag`         | 迭代式(调用堆栈大小为常数复杂度)解析。
+`kParseStopWhenDoneFlag`      | 当从流解析了一个完整的 JSON 根节点之后,停止继续处理余下的流。当使用了此标志,解析器便不会产生 `kParseErrorDocumentRootNotSingular` 错误。可使用本标志去解析同一个流里的多个 JSON。
+`kParseFullPrecisionFlag`     | 使用完整的精确度去解析数字(较慢)。如不设置此标节,则会使用正常的精确度(较快)。正常精确度会有最多 3 个 [ULP](http://en.wikipedia.org/wiki/Unit_in_the_last_place) 的误差。
+`kParseCommentsFlag`          | 容许单行 `// ...` 及多行 `/* ... */` 注释(放宽的 JSON 语法)。
+`kParseNumbersAsStringsFlag`  | 把数字类型解析成字符串。
+`kParseTrailingCommasFlag`    | 容许在对象和数组结束前含有逗号(放宽的 JSON 语法)。
+`kParseNanAndInfFlag`         | 容许 `NaN`、`Inf`、`Infinity`、`-Inf` 及 `-Infinity` 作为 `double` 值(放宽的 JSON 语法)。
+
+由于使用了非类型模板参数,而不是函数参数,C++ 编译器能为个别组合生成代码,以改善性能及减少代码尺寸(当只用单种特化)。缺点是需要在编译期决定标志。
+
+`SourceEncoding` 参数定义流使用了什么编码。这与 `Document` 的 `Encoding` 不相同。细节可参考 [转码和校验](#TranscodingAndValidation) 一节。
+
+此外 `InputStream` 是输入流的类型。
+
+## 解析错误 {#ParseError}
+
+当解析过程顺利完成,`Document` 便会含有解析结果。当过程出现错误,原来的 DOM 会 * 维持不便 *。可使用 `bool HasParseError()`、`ParseErrorCode GetParseError()` 及 `size_t GetParseOffset()` 获取解析的错误状态。
+
+解析错误代号                                | 描述
+--------------------------------------------|---------------------------------------------------
+`kParseErrorNone`                           | 无错误。
+`kParseErrorDocumentEmpty`                  | 文档是空的。
+`kParseErrorDocumentRootNotSingular`        | 文档的根后面不能有其它值。
+`kParseErrorValueInvalid`                   | 不合法的值。
+`kParseErrorObjectMissName`                 | Object 成员缺少名字。
+`kParseErrorObjectMissColon`                | Object 成员名字后缺少冒号。
+`kParseErrorObjectMissCommaOrCurlyBracket`  | Object 成员后缺少逗号或 `}`。
+`kParseErrorArrayMissCommaOrSquareBracket`  | Array 元素后缺少逗号或 `]` 。
+`kParseErrorStringUnicodeEscapeInvalidHex`  | String 中的 `\\u` 转义符后含非十六进位数字。
+`kParseErrorStringUnicodeSurrogateInvalid`  | String 中的代理对(surrogate pair)不合法。
+`kParseErrorStringEscapeInvalid`            | String 含非法转义字符。
+`kParseErrorStringMissQuotationMark`        | String 缺少关闭引号。
+`kParseErrorStringInvalidEncoding`          | String 含非法编码。
+`kParseErrorNumberTooBig`                   | Number 的值太大,不能存储于 `double`。
+`kParseErrorNumberMissFraction`             | Number 缺少了小数部分。
+`kParseErrorNumberMissExponent`             | Number 缺少了指数。
+
+错误的偏移量定义为从流开始至错误处的字符数量。目前 RapidJSON 不记录错误行号。
+
+要取得错误讯息,RapidJSON 在 `rapidjson/error/en.h` 中提供了英文错误讯息。使用者可以修改它用于其他语言环境,或使用一个自定义的本地化系统。
+
+以下是一个处理错误的例子。
+
+~~~~~~~~~~cpp
+#include "rapidjson/document.h"
+#include "rapidjson/error/en.h"
+
+// ...
+Document d;
+if (d.Parse(json).HasParseError()) {
+    fprintf(stderr, "\nError(offset %u): %s\n", 
+        (unsigned)d.GetErrorOffset(),
+        GetParseError_En(d.GetParseErrorCode()));
+    // ...
+}
+~~~~~~~~~~
+
+## 原位解析 {#InSituParsing}
+
+根据 [维基百科](http://en.wikipedia.org/wiki/In_situ):
+
+> *In situ* ... is a Latin phrase that translates literally to "on site" or "in position". It means "locally", "on site", "on the premises" or "in place" to describe an event where it takes place, and is used in many different contexts.
+> ...
+> (In computer science) An algorithm is said to be an in situ algorithm, or in-place algorithm, if the extra amount of memory required to execute the algorithm is O(1), that is, does not exceed a constant no matter how large the input. For example, heapsort is an in situ sorting algorithm.
+
+> 翻译:*In situ*……是一个拉丁文片语,字面上的意思是指「现场」、「在位置」。在许多不同语境中,它描述一个事件发生的位置,意指「本地」、「现场」、「在处所」、「就位」。
+> ……
+> (在计算机科学中)一个算法若称为原位算法,或在位算法,是指执行该算法所需的额外内存空间是 O(1) 的,换句话说,无论输入大小都只需要常数空间。例如,堆排序是一个原位排序算法。
+
+在正常的解析过程中,对 JSON string 解码并复制至其他缓冲区是一个很大的开销。原位解析(*in situ* parsing)把这些 JSON string 直接解码于它原来存储的地方。由于解码后的 string 长度总是短于或等于原来储存于 JSON 的 string,所以这是可行的。在这个语境下,对 JSON string 进行解码是指处理转义符,如 `"\n"`、`"\u1234"` 等,以及在 string 末端加入空终止符号 (`'\0'`)。
+
+以下的图比较正常及原位解析。JSON string 值包含指向解码后的字符串。
+
+![正常解析](diagram/normalparsing.png)
+
+在正常解析中,解码后的字符串被复制至全新分配的缓冲区中。`"\\n"`(2 个字符)被解码成 `"\n"`(1 个字符)。`"\\u0073"`(6 个字符)被解码成 `"s"`(1 个字符)。
+
+![原位解析](diagram/insituparsing.png)
+
+原位解析直接修改了原来的 JSON。图中高亮了被更新的字符。若 JSON string 不含转义符,例如 `"msg"`,那么解析过程仅仅是以空字符代替结束双引号。
+
+由于原位解析修改了输入,其解析 API 需要 `char*` 而非 `const char*`。
+
+~~~~~~~~~~cpp
+// 把整个文件读入 buffer
+FILE* fp = fopen("test.json", "r");
+fseek(fp, 0, SEEK_END);
+size_t filesize = (size_t)ftell(fp);
+fseek(fp, 0, SEEK_SET);
+char* buffer = (char*)malloc(filesize + 1);
+size_t readLength = fread(buffer, 1, filesize, fp);
+buffer[readLength] = '\0';
+fclose(fp);
+
+// 原位解析 buffer 至 d,buffer 内容会被修改。
+Document d;
+d.ParseInsitu(buffer);
+
+// 在此查询、修改 DOM……
+
+free(buffer);
+// 注意:在这个位置,d 可能含有指向已被释放的 buffer 的悬空指针
+~~~~~~~~~~
+
+JSON string 会被打上 const-string 的标志。但它们可能并非真正的「常数」。它的生命周期取决于存储 JSON 的缓冲区。
+
+原位解析把分配开销及内存复制减至最小。通常这样做能改善缓存一致性,而这对现代计算机来说是一个重要的性能因素。
+
+原位解析有以下限制:
+
+1. 整个 JSON 须存储在内存之中。
+2. 流的来源缓码与文档的目标编码必须相同。
+3. 需要保留缓冲区,直至文档不再被使用。
+4. 若 DOM 需要在解析后被长期使用,而 DOM 内只有很少 JSON string,保留缓冲区可能造成内存浪费。
+
+原位解析最适合用于短期的、用完即弃的 JSON。实际应用中,这些场合是非常普遍的,例如反序列化 JSON 至 C++ 对象、处理以 JSON 表示的 web 请求等。
+
+## 转码与校验 {#TranscodingAndValidation}
+
+RapidJSON 内部支持不同 Unicode 格式(正式的术语是 UCS 变换格式)间的转换。在 DOM 解析时,流的来源编码与 DOM 的编码可以不同。例如,来源流可能含有 UTF-8 的 JSON,而 DOM 则使用 UTF-16 编码。在 [EncodedInputStream](doc/stream.zh-cn.md) 一节里有一个例子。
+
+当从 DOM 输出一个 JSON 至输出流之时,也可以使用转码功能。在 [EncodedOutputStream](doc/stream.zh-cn.md) 一节里有一个例子。
+
+在转码过程中,会把来源 string 解码成 Unicode 码点,然后把码点编码成目标格式。在解码时,它会校验来源 string 的字节序列是否合法。若遇上非合法序列,解析器会停止并返回 `kParseErrorStringInvalidEncoding` 错误。
+
+当来源编码与 DOM 的编码相同,解析器缺省地 * 不会 * 校验序列。使用者可开启 `kParseValidateEncodingFlag` 去强制校验。
+
+# 技巧 {#Techniques}
+
+这里讨论一些 DOM API 的使用技巧。
+
+## 把 DOM 作为 SAX 事件发表者
+
+在 RapidJSON 中,利用 `Writer` 把 DOM 生成 JSON 的做法,看来有点奇怪。
+
+~~~~~~~~~~cpp
+// ...
+Writer<StringBuffer> writer(buffer);
+d.Accept(writer);
+~~~~~~~~~~
+
+实际上,`Value::Accept()` 是负责发布该值相关的 SAX 事件至处理器的。通过这个设计,`Value` 及 `Writer` 解除了偶合。`Value` 可生成 SAX 事件,而 `Writer` 则可以处理这些事件。
+
+使用者可以创建自定义的处理器,去把 DOM 转换成其它格式。例如,一个把 DOM 转换成 XML 的处理器。
+
+要知道更多关于 SAX 事件与处理器,可参阅 [SAX](doc/sax.zh-cn.md)。
+
+## 使用者缓冲区 {#UserBuffer}
+
+许多应用软件可能需要尽量减少内存分配。
+
+`MemoryPoolAllocator` 可以帮助这方面,它容许使用者提供一个缓冲区。该缓冲区可能置于程序堆栈,或是一个静态分配的「草稿缓冲区(scratch buffer)」(一个静态/全局的数组),用于储存临时数据。
+
+`MemoryPoolAllocator` 会先用使用者缓冲区去解决分配请求。当使用者缓冲区用完,就会从基础分配器(缺省为 `CrtAllocator`)分配一块内存。
+
+以下是使用堆栈内存的例子,第一个分配器用于存储值,第二个用于解析时的临时缓冲。
+
+~~~~~~~~~~cpp
+typedef GenericDocument<UTF8<>, MemoryPoolAllocator<>, MemoryPoolAllocator<>> DocumentType;
+char valueBuffer[4096];
+char parseBuffer[1024];
+MemoryPoolAllocator<> valueAllocator(valueBuffer, sizeof(valueBuffer));
+MemoryPoolAllocator<> parseAllocator(parseBuffer, sizeof(parseBuffer));
+DocumentType d(&valueAllocator, sizeof(parseBuffer), &parseAllocator);
+d.Parse(json);
+~~~~~~~~~~
+
+若解析时分配总量少于 4096+1024 字节时,这段代码不会造成任何堆内存分配(经 `new` 或 `malloc()`)。
+
+使用者可以通过 `MemoryPoolAllocator::Size()` 查询当前已分的内存大小。那么使用者可以拟定使用者缓冲区的合适大小。

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fd280b5c/thirdparty/rapidjson-1.1.0/doc/encoding.md
----------------------------------------------------------------------
diff --git a/thirdparty/rapidjson-1.1.0/doc/encoding.md b/thirdparty/rapidjson-1.1.0/doc/encoding.md
new file mode 100644
index 0000000..8f8ff7f
--- /dev/null
+++ b/thirdparty/rapidjson-1.1.0/doc/encoding.md
@@ -0,0 +1,146 @@
+# Encoding
+
+According to [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf),
+
+> (in Introduction) JSON text is a sequence of Unicode code points.
+
+The earlier [RFC4627](http://www.ietf.org/rfc/rfc4627.txt) stated that,
+
+> (in §3) JSON text SHALL be encoded in Unicode.  The default encoding is UTF-8.
+
+> (in §6) JSON may be represented using UTF-8, UTF-16, or UTF-32. When JSON is written in UTF-8, JSON is 8bit compatible.  When JSON is written in UTF-16 or UTF-32, the binary content-transfer-encoding must be used.
+
+RapidJSON supports various encodings. It can also validate the encodings of JSON, and transconding JSON among encodings. All these features are implemented internally, without the need for external libraries (e.g. [ICU](http://site.icu-project.org/)).
+
+[TOC]
+
+# Unicode {#Unicode}
+From [Unicode's official website](http://www.unicode.org/standard/WhatIsUnicode.html):
+> Unicode provides a unique number for every character, 
+> no matter what the platform,
+> no matter what the program,
+> no matter what the language.
+
+Those unique numbers are called code points, which is in the range `0x0` to `0x10FFFF`.
+
+## Unicode Transformation Format {#UTF}
+
+There are various encodings for storing Unicode code points. These are called Unicode Transformation Format (UTF). RapidJSON supports the most commonly used UTFs, including
+
+* UTF-8: 8-bit variable-width encoding. It maps a code point to 1–4 bytes.
+* UTF-16: 16-bit variable-width encoding. It maps a code point to 1–2 16-bit code units (i.e., 2–4 bytes).
+* UTF-32: 32-bit fixed-width encoding. It directly maps a code point to a single 32-bit code unit (i.e. 4 bytes).
+
+For UTF-16 and UTF-32, the byte order (endianness) does matter. Within computer memory, they are often stored in the computer's endianness. However, when it is stored in file or transferred over network, we need to state the byte order of the byte sequence, either little-endian (LE) or big-endian (BE). 
+
+RapidJSON provide these encodings via the structs in `rapidjson/encodings.h`:
+
+~~~~~~~~~~cpp
+namespace rapidjson {
+
+template<typename CharType = char>
+struct UTF8;
+
+template<typename CharType = wchar_t>
+struct UTF16;
+
+template<typename CharType = wchar_t>
+struct UTF16LE;
+
+template<typename CharType = wchar_t>
+struct UTF16BE;
+
+template<typename CharType = unsigned>
+struct UTF32;
+
+template<typename CharType = unsigned>
+struct UTF32LE;
+
+template<typename CharType = unsigned>
+struct UTF32BE;
+
+} // namespace rapidjson
+~~~~~~~~~~
+
+For processing text in memory, we normally use `UTF8`, `UTF16` or `UTF32`. For processing text via I/O, we may use `UTF8`, `UTF16LE`, `UTF16BE`, `UTF32LE` or `UTF32BE`.
+
+When using the DOM-style API, the `Encoding` template parameter in `GenericValue<Encoding>` and `GenericDocument<Encoding>` indicates the encoding to be used to represent JSON string in memory. So normally we will use `UTF8`, `UTF16` or `UTF32` for this template parameter. The choice depends on operating systems and other libraries that the application is using. For example, Windows API represents Unicode characters in UTF-16, while most Linux distributions and applications prefer UTF-8.
+
+Example of UTF-16 DOM declaration:
+
+~~~~~~~~~~cpp
+typedef GenericDocument<UTF16<> > WDocument;
+typedef GenericValue<UTF16<> > WValue;
+~~~~~~~~~~
+
+For a detail example, please check the example in [DOM's Encoding](doc/stream.md) section.
+
+## Character Type {#CharacterType}
+
+As shown in the declaration, each encoding has a `CharType` template parameter. Actually, it may be a little bit confusing, but each `CharType` stores a code unit, not a character (code point). As mentioned in previous section, a code point may be encoded to 1–4 code units for UTF-8.
+
+For `UTF16(LE|BE)`, `UTF32(LE|BE)`, the `CharType` must be integer type of at least 2 and 4 bytes  respectively.
+
+Note that C++11 introduces `char16_t` and `char32_t`, which can be used for `UTF16` and `UTF32` respectively.
+
+## AutoUTF {#AutoUTF}
+
+Previous encodings are statically bound in compile-time. In other words, user must know exactly which encodings will be used in the memory or streams. However, sometimes we may need to read/write files of different encodings. The encoding needed to be decided in runtime.
+
+`AutoUTF` is an encoding designed for this purpose. It chooses which encoding to be used according to the input or output stream. Currently, it should be used with `EncodedInputStream` and `EncodedOutputStream`.
+
+## ASCII {#ASCII}
+
+Although the JSON standards did not mention about [ASCII](http://en.wikipedia.org/wiki/ASCII), sometimes we would like to write 7-bit ASCII JSON for applications that cannot handle UTF-8. Since any JSON can represent unicode characters in escaped sequence `\uXXXX`, JSON can always be encoded in ASCII.
+
+Here is an example for writing a UTF-8 DOM into ASCII:
+
+~~~~~~~~~~cpp
+using namespace rapidjson;
+Document d; // UTF8<>
+// ...
+StringBuffer buffer;
+Writer<StringBuffer, Document::EncodingType, ASCII<> > writer(buffer);
+d.Accept(writer);
+std::cout << buffer.GetString();
+~~~~~~~~~~
+
+ASCII can be used in input stream. If the input stream contains bytes with values above 127, it will cause `kParseErrorStringInvalidEncoding` error.
+
+ASCII *cannot* be used in memory (encoding of `Document` or target encoding of `Reader`), as it cannot represent Unicode code points.
+
+# Validation & Transcoding {#ValidationTranscoding}
+
+When RapidJSON parses a JSON, it can validate the input JSON, whether it is a valid sequence of a specified encoding. This option can be turned on by adding `kParseValidateEncodingFlag` in `parseFlags` template parameter.
+
+If the input encoding and output encoding is different, `Reader` and `Writer` will automatically transcode (convert) the text. In this case, `kParseValidateEncodingFlag` is not necessary, as it must decode the input sequence. And if the sequence was unable to be decoded, it must be invalid.
+
+## Transcoder {#Transcoder}
+
+Although the encoding functions in RapidJSON are designed for JSON parsing/generation, user may abuse them for transcoding of non-JSON strings.
+
+Here is an example for transcoding a string from UTF-8 to UTF-16:
+
+~~~~~~~~~~cpp
+#include "rapidjson/encodings.h"
+
+using namespace rapidjson;
+
+const char* s = "..."; // UTF-8 string
+StringStream source(s);
+GenericStringBuffer<UTF16<> > target;
+
+bool hasError = false;
+while (source.Peek() != '\0')
+    if (!Transcoder<UTF8<>, UTF16<> >::Transcode(source, target)) {
+        hasError = true;
+        break;
+    }
+
+if (!hasError) {
+    const wchar_t* t = target.GetString();
+    // ...
+}
+~~~~~~~~~~
+
+You may also use `AutoUTF` and the associated streams for setting source/target encoding in runtime.

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fd280b5c/thirdparty/rapidjson-1.1.0/doc/encoding.zh-cn.md
----------------------------------------------------------------------
diff --git a/thirdparty/rapidjson-1.1.0/doc/encoding.zh-cn.md b/thirdparty/rapidjson-1.1.0/doc/encoding.zh-cn.md
new file mode 100644
index 0000000..6816923
--- /dev/null
+++ b/thirdparty/rapidjson-1.1.0/doc/encoding.zh-cn.md
@@ -0,0 +1,152 @@
+# 编码
+
+根据 [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf):
+
+> (in Introduction) JSON text is a sequence of Unicode code points.
+> 
+> 翻译:JSON 文本是 Unicode 码点的序列。
+
+较早的 [RFC4627](http://www.ietf.org/rfc/rfc4627.txt) 申明:
+
+> (in §3) JSON text SHALL be encoded in Unicode.  The default encoding is UTF-8.
+> 
+> 翻译:JSON 文本应该以 Unicode 编码。缺省的编码为 UTF-8。
+
+> (in §6) JSON may be represented using UTF-8, UTF-16, or UTF-32. When JSON is written in UTF-8, JSON is 8bit compatible.  When JSON is written in UTF-16 or UTF-32, the binary content-transfer-encoding must be used.
+> 
+> 翻译:JSON 可使用 UTF-8、UTF-16 或 UTF-18 表示。当 JSON 以 UTF-8 写入,该 JSON 是 8 位兼容的。当 JSON 以 UTF-16 或 UTF-32 写入,就必须使用二进制的内容传送编码。
+
+RapidJSON 支持多种编码。它也能检查 JSON 的编码,以及在不同编码中进行转码。所有这些功能都是在内部实现,无需使用外部的程序库(如 [ICU](http://site.icu-project.org/))。
+
+[TOC]
+
+# Unicode {#Unicode}
+根据 [Unicode 的官方网站](http://www.unicode.org/standard/translations/t-chinese.html):
+>Unicode 给每个字符提供了一个唯一的数字,
+不论是什么平台、
+不论是什么程序、
+不论是什么语言。
+
+这些唯一数字称为码点(code point),其范围介乎 `0x0` 至 `0x10FFFF` 之间。
+
+## Unicode 转换格式 {#UTF}
+
+存储 Unicode 码点有多种编码方式。这些称为 Unicode 转换格式(Unicode Transformation Format, UTF)。RapidJSON 支持最常用的 UTF,包括:
+
+* UTF-8:8 位可变长度编码。它把一个码点映射至 1 至 4 个字节。
+* UTF-16:16 位可变长度编码。它把一个码点映射至 1 至 2 个 16 位编码单元(即 2 至 4 个字节)。
+* UTF-32:32 位固定长度编码。它直接把码点映射至单个 32 位编码单元(即 4 字节)。
+
+对于 UTF-16 及 UTF-32 来说,字节序(endianness)是有影响的。在内存中,它们通常都是以该计算机的字节序来存储。然而,当要储存在文件中或在网上传输,我们需要指明字节序列的字节序,是小端(little endian, LE)还是大端(big-endian, BE)。 
+
+RapidJSON 通过 `rapidjson/encodings.h` 中的 struct 去提供各种编码:
+
+~~~~~~~~~~cpp
+namespace rapidjson {
+
+template<typename CharType = char>
+struct UTF8;
+
+template<typename CharType = wchar_t>
+struct UTF16;
+
+template<typename CharType = wchar_t>
+struct UTF16LE;
+
+template<typename CharType = wchar_t>
+struct UTF16BE;
+
+template<typename CharType = unsigned>
+struct UTF32;
+
+template<typename CharType = unsigned>
+struct UTF32LE;
+
+template<typename CharType = unsigned>
+struct UTF32BE;
+
+} // namespace rapidjson
+~~~~~~~~~~
+
+对于在内存中的文本,我们正常会使用 `UTF8`、`UTF16` 或 `UTF32`。对于处理经过 I/O 的文本,我们可使用 `UTF8`、`UTF16LE`、`UTF16BE`、`UTF32LE` 或 `UTF32BE`。
+
+当使用 DOM 风格的 API,`GenericValue<Encoding>` 及 `GenericDocument<Encoding>` 里的 `Encoding` 模板参数是用于指明内存中存储的 JSON 字符串使用哪种编码。因此通常我们会在此参数中使用 `UTF8`、`UTF16` 或 `UTF32`。如何选择,视乎应用软件所使用的操作系统及其他程序库。例如,Windows API 使用 UTF-16 表示 Unicode 字符,而多数的 Linux 发行版本及应用软件则更喜欢 UTF-8。
+
+使用 UTF-16 的 DOM 声明例子:
+
+~~~~~~~~~~cpp
+typedef GenericDocument<UTF16<> > WDocument;
+typedef GenericValue<UTF16<> > WValue;
+~~~~~~~~~~
+
+可以在 [DOM's Encoding](doc/stream.zh-cn.md) 一节看到更详细的使用例子。
+
+## 字符类型 {#CharacterType}
+
+从之前的声明中可以看到,每个编码都有一个 `CharType` 模板参数。这可能比较容易混淆,实际上,每个 `CharType` 存储一个编码单元,而不是一个字符(码点)。如之前所谈及,在 UTF-8 中一个码点可能会编码成 1 至 4 个编码单元。
+
+对于 `UTF16(LE|BE)` 及 `UTF32(LE|BE)` 来说,`CharType` 必须分别是一个至少 2 及 4 字节的整数类型。
+
+注意 C++11 新添了 `char16_t` 及 `char32_t` 类型,也可分别用于 `UTF16` 及 `UTF32`。
+
+## AutoUTF {#AutoUTF}
+
+上述所介绍的编码都是在编译期静态挷定的。换句话说,使用者必须知道内存或流之中使用了哪种编码。然而,有时候我们可能需要读写不同编码的文件,而且这些编码需要在运行时才能决定。
+
+`AutoUTF` 是为此而设计的编码。它根据输入或输出流来选择使用哪种编码。目前它应该与 `EncodedInputStream` 及 `EncodedOutputStream` 结合使用。
+
+## ASCII {#ASCII}
+
+虽然 JSON 标准并未提及 [ASCII](http://en.wikipedia.org/wiki/ASCII),有时候我们希望写入 7 位的 ASCII JSON,以供未能处理 UTF-8 的应用程序使用。由于任 JSON 都可以把 Unicode 字符表示为 `\uXXXX` 转义序列,JSON 总是可用 ASCII 来编码。
+
+以下的例子把 UTF-8 的 DOM 写成 ASCII 的 JSON:
+
+~~~~~~~~~~cpp
+using namespace rapidjson;
+Document d; // UTF8<>
+// ...
+StringBuffer buffer;
+Writer<StringBuffer, Document::EncodingType, ASCII<> > writer(buffer);
+d.Accept(writer);
+std::cout << buffer.GetString();
+~~~~~~~~~~
+
+ASCII 可用于输入流。当输入流包含大于 127 的字节,就会导致 `kParseErrorStringInvalidEncoding` 错误。
+
+ASCII * 不能 * 用于内存(`Document` 的编码,或 `Reader` 的目标编码),因为它不能表示 Unicode 码点。
+
+# 校验及转码 {#ValidationTranscoding}
+
+当 RapidJSON 解析一个 JSON 时,它能校验输入 JSON,判断它是否所标明编码的合法序列。要开启此选项,请把 `kParseValidateEncodingFlag` 加入 `parseFlags` 模板参数。
+
+若输入编码和输出编码并不相同,`Reader` 及 `Writer` 会算把文本转码。在这种情况下,并不需要 `kParseValidateEncodingFlag`,因为它必须解码输入序列。若序列不能被解码,它必然是不合法的。
+
+## 转码器 {#Transcoder}
+
+虽然 RapidJSON 的编码功能是为 JSON 解析/生成而设计,使用者也可以“滥用”它们来为非 JSON 字符串转码。
+
+以下的例子把 UTF-8 字符串转码成 UTF-16:
+
+~~~~~~~~~~cpp
+#include "rapidjson/encodings.h"
+
+using namespace rapidjson;
+
+const char* s = "..."; // UTF-8 string
+StringStream source(s);
+GenericStringBuffer<UTF16<> > target;
+
+bool hasError = false;
+while (source.Peek() != '\0')
+    if (!Transcoder<UTF8<>, UTF16<> >::Transcode(source, target)) {
+        hasError = true;
+        break;
+    }
+
+if (!hasError) {
+    const wchar_t* t = target.GetString();
+    // ...
+}
+~~~~~~~~~~
+
+你也可以用 `AutoUTF` 及对应的流来在运行时设置内源/目的之编码。

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fd280b5c/thirdparty/rapidjson-1.1.0/doc/faq.md
----------------------------------------------------------------------
diff --git a/thirdparty/rapidjson-1.1.0/doc/faq.md b/thirdparty/rapidjson-1.1.0/doc/faq.md
new file mode 100644
index 0000000..1b0541c
--- /dev/null
+++ b/thirdparty/rapidjson-1.1.0/doc/faq.md
@@ -0,0 +1,289 @@
+# FAQ
+
+[TOC]
+
+## General
+
+1. What is RapidJSON?
+
+   RapidJSON is a C++ library for parsing and generating JSON. You may check all [features](doc/features.md) of it.
+
+2. Why is RapidJSON named so?
+
+   It is inspired by [RapidXML](http://rapidxml.sourceforge.net/), which is a fast XML DOM parser.
+
+3. Is RapidJSON similar to RapidXML?
+
+   RapidJSON borrowed some designs of RapidXML, including *in situ* parsing, header-only library. But the two APIs are completely different. Also RapidJSON provide many features that are not in RapidXML.
+
+4. Is RapidJSON free?
+
+   Yes, it is free under MIT license. It can be used in commercial applications. Please check the details in [license.txt](https://github.com/miloyip/rapidjson/blob/master/license.txt).
+
+5. Is RapidJSON small? What are its dependencies? 
+
+   Yes. A simple executable which parses a JSON and prints its statistics is less than 30KB on Windows.
+
+   RapidJSON depends on C++ standard library only.
+
+6. How to install RapidJSON?
+
+   Check [Installation section](https://miloyip.github.io/rapidjson/).
+
+7. Can RapidJSON run on my platform?
+
+   RapidJSON has been tested in many combinations of operating systems, compilers and CPU architecture by the community. But we cannot ensure that it can be run on your particular platform. Building and running the unit test suite will give you the answer.
+
+8. Does RapidJSON support C++03? C++11?
+
+   RapidJSON was firstly implemented for C++03. Later it added optional support of some C++11 features (e.g., move constructor, `noexcept`). RapidJSON shall be compatible with C++03 or C++11 compliant compilers.
+
+9. Does RapidJSON really work in real applications?
+
+   Yes. It is deployed in both client and server real applications. A community member reported that RapidJSON in their system parses 50 million JSONs daily.
+
+10. How RapidJSON is tested?
+
+   RapidJSON contains a unit test suite for automatic testing. [Travis](https://travis-ci.org/miloyip/rapidjson/)(for Linux) and [AppVeyor](https://ci.appveyor.com/project/miloyip/rapidjson/)(for Windows) will compile and run the unit test suite for all modifications. The test process also uses Valgrind (in Linux) to detect memory leaks.
+
+11. Is RapidJSON well documented?
+
+   RapidJSON provides user guide and API documentationn.
+
+12. Are there alternatives?
+
+   Yes, there are a lot alternatives. For example, [nativejson-benchmark](https://github.com/miloyip/nativejson-benchmark) has a listing of open-source C/C++ JSON libraries. [json.org](http://www.json.org/) also has a list.
+
+## JSON
+
+1. What is JSON?
+
+   JSON (JavaScript Object Notation) is a lightweight data-interchange format. It uses human readable text format. More details of JSON can be referred to [RFC7159](http://www.ietf.org/rfc/rfc7159.txt) and [ECMA-404](http://www.ecma-international.org/publications/standards/Ecma-404.htm).
+
+2. What are applications of JSON?
+
+   JSON are commonly used in web applications for transferring structured data. It is also used as a file format for data persistence.
+
+2. Does RapidJSON conform to the JSON standard?
+
+   Yes. RapidJSON is fully compliance with [RFC7159](http://www.ietf.org/rfc/rfc7159.txt) and [ECMA-404](http://www.ecma-international.org/publications/standards/Ecma-404.htm). It can handle corner cases, such as supporting null character and surrogate pairs in JSON strings.
+
+3. Does RapidJSON support relaxed syntax?
+
+   Currently no. RapidJSON only support the strict standardized format. Support on related syntax is under discussion in this [issue](https://github.com/miloyip/rapidjson/issues/36).
+
+## DOM and SAX
+
+1. What is DOM style API?
+
+   Document Object Model (DOM) is an in-memory representation of JSON for query and manipulation.
+
+2. What is SAX style API?
+
+   SAX is an event-driven API for parsing and generation.
+
+3. Should I choose DOM or SAX?
+
+   DOM is easy for query and manipulation. SAX is very fast and memory-saving but often more difficult to be applied.
+
+4. What is *in situ* parsing?
+
+   *in situ* parsing decodes the JSON strings directly into the input JSON. This is an optimization which can reduce memory consumption and improve performance, but the input JSON will be modified. Check [in-situ parsing](doc/dom.md) for details.
+
+5. When does parsing generate an error?
+
+   The parser generates an error when the input JSON contains invalid syntax, or a value can not be represented (a number is too big), or the handler of parsers terminate the parsing. Check [parse error](doc/dom.md) for details.
+
+6. What error information is provided? 
+
+   The error is stored in `ParseResult`, which includes the error code and offset (number of characters from the beginning of JSON). The error code can be translated into human-readable error message.
+
+7. Why not just using `double` to represent JSON number?
+
+   Some applications use 64-bit unsigned/signed integers. And these integers cannot be converted into `double` without loss of precision. So the parsers detects whether a JSON number is convertible to different types of integers and/or `double`.
+
+8. How to clear-and-minimize a document or value?
+
+   Call one of the `SetXXX()` methods - they call destructor which deallocates DOM data:
+
+   ~~~~~~~~~~cpp
+   Document d;
+   ...
+   d.SetObject();  // clear and minimize
+   ~~~~~~~~~~
+
+   Alternatively, use equivalent of the [C++ swap with temporary idiom](https://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Clear-and-minimize):
+   ~~~~~~~~~~cpp
+   Value(kObjectType).Swap(d);
+   ~~~~~~~~~~
+   or equivalent, but sightly longer to type:
+   ~~~~~~~~~~cpp
+   d.Swap(Value(kObjectType).Move()); 
+   ~~~~~~~~~~
+
+9. How to insert a document node into another document?
+
+   Let's take the following two DOM trees represented as JSON documents:
+   ~~~~~~~~~~cpp
+   Document person;
+   person.Parse("{\"person\":{\"name\":{\"first\":\"Adam\",\"last\":\"Thomas\"}}}");
+   
+   Document address;
+   address.Parse("{\"address\":{\"city\":\"Moscow\",\"street\":\"Quiet\"}}");
+   ~~~~~~~~~~
+   Let's assume we want to merge them in such way that the whole `address` document becomes a node of the `person`:
+   ~~~~~~~~~~js
+   { "person": {
+      "name": { "first": "Adam", "last": "Thomas" },
+      "address": { "city": "Moscow", "street": "Quiet" }
+      }
+   }
+   ~~~~~~~~~~
+
+   The most important requirement to take care of document and value life-cycle as well as consistent memory managent using the right allocator during the value transfer.
+   
+   Simple yet most efficient way to achieve that is to modify the `address` definition above to initialize it with allocator of the `person` document, then we just add the root member of the value:
+   ~~~~~~~~~~cpp
+   Documnet address(person.GetAllocator());
+   ...
+   person["person"].AddMember("address", address["address"], person.GetAllocator());
+   ~~~~~~~~~~
+Alternatively, if we don't want to explicitly refer to the root value of `address` by name, we can refer to it via iterator:
+   ~~~~~~~~~~cpp
+   auto addressRoot = address.MemberBegin();
+   person["person"].AddMember(addressRoot->name, addressRoot->value, person.GetAllocator());
+   ~~~~~~~~~~
+   
+   Second way is to deep-clone the value from the address document:
+   ~~~~~~~~~~cpp
+   Value addressValue = Value(address["address"], person.GetAllocator());
+   person["person"].AddMember("address", addressValue, person.GetAllocator());
+   ~~~~~~~~~~
+
+## Document/Value (DOM)
+
+1. What is move semantics? Why?
+
+   Instead of copy semantics, move semantics is used in `Value`. That means, when assigning a source value to a target value, the ownership of source value is moved to the target value.
+
+   Since moving is faster than copying, this design decision forces user to aware of the copying overhead.
+
+2. How to copy a value?
+
+   There are two APIs: constructor with allocator, and `CopyFrom()`. See [Deep Copy Value](doc/tutorial.md) for an example.
+
+3. Why do I need to provide the length of string?
+
+   Since C string is null-terminated, the length of string needs to be computed via `strlen()`, with linear runtime complexity. This incurs an unncessary overhead of many operations, if the user already knows the length of string.
+
+   Also, RapidJSON can handle `\u0000` (null character) within a string. If a string contains null characters, `strlen()` cannot return the true length of it. In such case user must provide the length of string explicitly.
+
+4. Why do I need to provide allocator parameter in many DOM manipulation API?
+
+   Since the APIs are member functions of `Value`, we do not want to save an allocator pointer in every `Value`.
+
+5. Does it convert between numerical types?
+
+   When using `GetInt()`, `GetUint()`, ... conversion may occur. For integer-to-integer conversion, it only convert when it is safe (otherwise it will assert). However, when converting a 64-bit signed/unsigned integer to double, it will convert but be aware that it may lose precision. A number with fraction, or an integer larger than 64-bit, can only be obtained by `GetDouble()`.
+
+## Reader/Writer (SAX)
+
+1. Why don't we just `printf` a JSON? Why do we need a `Writer`? 
+
+   Most importantly, `Writer` will ensure the output JSON is well-formed. Calling SAX events incorrectly (e.g. `StartObject()` pairing with `EndArray()`) will assert. Besides, `Writer` will escapes strings (e.g., `\n`). Finally, the numeric output of `printf()` may not be a valid JSON number, especially in some locale with digit delimiters. And the number-to-string conversion in `Writer` is implemented with very fast algorithms, which outperforms than `printf()` or `iostream`.
+
+2. Can I pause the parsing process and resume it later?
+
+   This is not directly supported in the current version due to performance consideration. However, if the execution environment supports multi-threading, user can parse a JSON in a separate thread, and pause it by blocking in the input stream.
+
+## Unicode
+
+1. Does it support UTF-8, UTF-16 and other format?
+
+   Yes. It fully support UTF-8, UTF-16 (LE/BE), UTF-32 (LE/BE) and ASCII. 
+
+2. Can it validate the encoding?
+
+   Yes, just pass `kParseValidateEncodingFlag` to `Parse()`. If there is invalid encoding in the stream, it wil generate `kParseErrorStringInvalidEncoding` error.
+
+3. What is surrogate pair? Does RapidJSON support it?
+
+   JSON uses UTF-16 encoding when escaping unicode character, e.g. `\u5927` representing Chinese character "big". To handle characters other than those in basic multilingual plane (BMP), UTF-16 encodes those characters with two 16-bit values, which is called UTF-16 surrogate pair. For example, the Emoji character U+1F602 can be encoded as `\uD83D\uDE02` in JSON.
+
+   RapidJSON fully support parsing/generating UTF-16 surrogates. 
+
+4. Can it handle `\u0000` (null character) in JSON string?
+
+   Yes. RapidJSON fully support null character in JSON string. However, user need to be aware of it and using `GetStringLength()` and related APIs to obtain the true length of string.
+
+5. Can I output `\uxxxx` for all non-ASCII character?
+
+   Yes, use `ASCII<>` as output encoding template parameter in `Writer` can enforce escaping those characters.
+
+## Stream
+
+1. I have a big JSON file. Should I load the whole file to memory?
+
+   User can use `FileReadStream` to read the file chunk-by-chunk. But for *in situ* parsing, the whole file must be loaded.
+
+2. Can I parse JSON while it is streamed from network?
+
+   Yes. User can implement a custom stream for this. Please refer to the implementation of `FileReadStream`.
+
+3. I don't know what encoding will the JSON be. How to handle them?
+
+   You may use `AutoUTFInputStream` which detects the encoding of input stream automatically. However, it will incur some performance overhead.
+
+4. What is BOM? How RapidJSON handle it?
+
+   [Byte order mark (BOM)](http://en.wikipedia.org/wiki/Byte_order_mark) sometimes reside at the beginning of file/stream to indiciate the UTF encoding type of it.
+
+   RapidJSON's `EncodedInputStream` can detect/consume BOM. `EncodedOutputStream` can optionally write a BOM. See [Encoded Streams](doc/stream.md) for example.
+
+5. Why little/big endian is related?
+
+   little/big endian of stream is an issue for UTF-16 and UTF-32 streams, but not UTF-8 stream.
+
+## Performance
+
+1. Is RapidJSON really fast?
+
+   Yes. It may be the fastest open source JSON library. There is a [benchmark](https://github.com/miloyip/nativejson-benchmark) for evaluating performance of C/C++ JSON libaries.
+
+2. Why is it fast?
+
+   Many design decisions of RapidJSON is aimed at time/space performance. These may reduce user-friendliness of APIs. Besides, it also employs low-level optimizations (intrinsics, SIMD) and special algorithms (custom double-to-string, string-to-double conversions).
+
+3. What is SIMD? How it is applied in RapidJSON?
+
+   [SIMD](http://en.wikipedia.org/wiki/SIMD) instructions can perform parallel computation in modern CPUs. RapidJSON support Intel's SSE2/SSE4.2 to accelerate whitespace skipping. This improves performance of parsing indent formatted JSON. Define `RAPIDJSON_SSE2` or `RAPIDJSON_SSE42` macro to enable this feature. However, running the executable on a machine without such instruction set support will make it crash.
+
+4. Does it consume a lot of memory?
+
+   The design of RapidJSON aims at reducing memory footprint.
+
+   In the SAX API, `Reader` consumes memory portional to maximum depth of JSON tree, plus maximum length of JSON string.
+
+   In the DOM API, each `Value` consumes exactly 16/24 bytes for 32/64-bit architecture respectively. RapidJSON also uses a special memory allocator to minimize overhead of allocations.
+
+5. What is the purpose of being high performance?
+
+   Some applications need to process very large JSON files. Some server-side applications need to process huge amount of JSONs. Being high performance can improve both latency and throuput. In a broad sense, it will also save energy.
+
+## Gossip
+
+1. Who are the developers of RapidJSON?
+
+   Milo Yip ([miloyip](https://github.com/miloyip)) is the original author of RapidJSON. Many contributors from the world have improved RapidJSON.  Philipp A. Hartmann ([pah](https://github.com/pah)) has implemented a lot of improvements, setting up automatic testing and also involves in a lot of discussions for the community. Don Ding ([thebusytypist](https://github.com/thebusytypist)) implemented the iterative parser. Andrii Senkovych ([jollyroger](https://github.com/jollyroger)) completed the CMake migration. Kosta ([Kosta-Github](https://github.com/Kosta-Github)) provided a very neat short-string optimization. Thank you for all other contributors and community members as well.
+
+2. Why do you develop RapidJSON?
+
+   It was just a hobby project initially in 2011. Milo Yip is a game programmer and he just knew about JSON at that time and would like to apply JSON in future projects. As JSON seems very simple he would like to write a header-only and fast library.
+
+3. Why there is a long empty period of development?
+
+   It is basically due to personal issues, such as getting new family members. Also, Milo Yip has spent a lot of spare time on translating "Game Engine Architecture" by Jason Gregory into Chinese.
+
+4. Why did the repository move from Google Code to GitHub?
+
+   This is the trend. And GitHub is much more powerful and convenient.