Home | History | Annotate | Download | only in diagram
      1 digraph {
      2 	compound=true
      3 	fontname="Inconsolata, Consolas"
      4 	fontsize=10
      5 	margin="0,0"
      6 	ranksep=0.2
      7 	penwidth=0.5
      8 	
      9 	node [fontname="Inconsolata, Consolas", fontsize=10, penwidth=0.5]
     10 	edge [fontname="Inconsolata, Consolas", fontsize=10, arrowhead=normal]
     11 
     12 	{
     13 		node [shape=record, fontsize="8", margin="0.04", height=0.2, color=gray]
     14 		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"]
     15 		//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"]
     16 		newjson [shape=plaintext, label=<
     17 <table BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="2"><tr>
     18 <td>{</td>
     19 <td>"</td><td port="a">m</td><td>s</td><td>g</td><td bgcolor="yellow">\\0</td>
     20 <td>:</td>
     21 <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>
     22 <td>,</td>
     23 <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>
     24 <td>:</td>
     25 <td>1</td><td>0</td>
     26 <td>}</td>
     27 </tr></table>
     28 >, xlabel="After Parsing"]
     29 	}
     30 
     31 	subgraph cluster1 {
     32 		margin="10,10"
     33 		labeljust="left"
     34 		label = "Document by In situ Parsing"
     35 		style=filled
     36 		fillcolor=gray95
     37 		node [shape=Mrecord, style=filled, colorscheme=spectral7]
     38 		
     39 		root [label="{object|}", fillcolor=3]
     40 
     41 		{			
     42 			msg [label="{string|<a>}", fillcolor=5]
     43 			helloworld [label="{string|<a>}", fillcolor=5]
     44 			stars [label="{string|<a>}", fillcolor=5]
     45 			ten [label="{number|10}", fillcolor=6]
     46 		}
     47 	}
     48 
     49 	oldjson -> root [label=" ParseInsitu()" lhead="cluster1"]
     50 	edge [arrowhead=vee]
     51 	root -> { msg; stars }
     52 
     53 	edge [arrowhead="none"]
     54 	msg  -> helloworld
     55 	stars -> ten
     56 
     57 	{
     58 		edge [arrowhead=vee, arrowtail=dot, arrowsize=0.5, dir=both, tailclip=false]
     59 		msg:a:c -> newjson:a
     60 		helloworld:a:c -> newjson:b
     61 		stars:a:c -> newjson:c
     62 	}
     63 
     64 	//oldjson -> newjson [style=invis]
     65 }