@@ -12,7 +12,7 @@ bool RapidJsonHandler::Null()
1212 return false ;
1313
1414 TreeNode *parent = m_NodeStack.top ();
15- HandleArray (parent, STR_NULL);
15+ HandleArray (parent, STR_NULL, false );
1616 return true ;
1717}
1818
@@ -22,7 +22,7 @@ bool RapidJsonHandler::Bool(bool b)
2222 return false ;
2323
2424 TreeNode *parent = m_NodeStack.top ();
25- HandleArray (parent, b ? STR_TRUE : STR_FALSE);
25+ HandleArray (parent, b ? STR_TRUE : STR_FALSE, false );
2626 return true ;
2727}
2828
@@ -57,7 +57,7 @@ bool RapidJsonHandler::RawNumber(const Ch *str, unsigned /*length*/, bool /*copy
5757 return false ;
5858
5959 TreeNode *parent = m_NodeStack.top ();
60- HandleArray (parent, str);
60+ HandleArray (parent, str, false );
6161 return true ;
6262}
6363
@@ -74,7 +74,7 @@ bool RapidJsonHandler::String(const Ch *str, unsigned /*length*/, bool /*copy*/)
7474 }
7575
7676 TreeNode *parent = m_NodeStack.top ();
77- HandleArray (parent, str);
77+ HandleArray (parent, str, true );
7878
7979 return true ;
8080}
@@ -193,7 +193,7 @@ bool RapidJsonHandler::EndArray(unsigned /*elementCount*/)
193193 return true ;
194194}
195195
196- void RapidJsonHandler::HandleArray (TreeNode *node, const char *const str)
196+ void RapidJsonHandler::HandleArray (TreeNode *node, const char *const str, bool bQuote )
197197{
198198 if (!node || !str)
199199 return ;
@@ -211,6 +211,9 @@ void RapidJsonHandler::HandleArray(TreeNode *node, const char *const str)
211211 node->counter ++;
212212 }
213213
214- // insert
215- m_dlg->InsertToTree (node->subRoot , node->node .key + " : \" " + node->node .value + " \" " );
214+ // Insert item to tree
215+ if (bQuote)
216+ m_dlg->InsertToTree (node->subRoot , node->node .key + " : \" " + node->node .value + " \" " );
217+ else
218+ m_dlg->InsertToTree (node->subRoot , node->node .key + " : " + node->node .value );
216219}
0 commit comments