@@ -12,7 +12,7 @@ bool RapidJsonHandler::Null()
12
12
return false ;
13
13
14
14
TreeNode *parent = m_NodeStack.top ();
15
- HandleArray (parent, STR_NULL, false );
15
+ InsertToTree (parent, STR_NULL, false );
16
16
return true ;
17
17
}
18
18
@@ -22,7 +22,7 @@ bool RapidJsonHandler::Bool(bool b)
22
22
return false ;
23
23
24
24
TreeNode *parent = m_NodeStack.top ();
25
- HandleArray (parent, b ? STR_TRUE : STR_FALSE, false );
25
+ InsertToTree (parent, b ? STR_TRUE : STR_FALSE, false );
26
26
return true ;
27
27
}
28
28
@@ -57,7 +57,7 @@ bool RapidJsonHandler::RawNumber(const Ch *str, unsigned /*length*/, bool /*copy
57
57
return false ;
58
58
59
59
TreeNode *parent = m_NodeStack.top ();
60
- HandleArray (parent, str, false );
60
+ InsertToTree (parent, str, false );
61
61
return true ;
62
62
}
63
63
@@ -74,7 +74,7 @@ bool RapidJsonHandler::String(const Ch *str, unsigned /*length*/, bool /*copy*/)
74
74
}
75
75
76
76
TreeNode *parent = m_NodeStack.top ();
77
- HandleArray (parent, str, true );
77
+ InsertToTree (parent, str, true );
78
78
79
79
return true ;
80
80
}
@@ -193,7 +193,7 @@ bool RapidJsonHandler::EndArray(unsigned /*elementCount*/)
193
193
return true ;
194
194
}
195
195
196
- void RapidJsonHandler::HandleArray (TreeNode *node, const char *const str, bool bQuote)
196
+ void RapidJsonHandler::InsertToTree (TreeNode *node, const char *const str, bool bQuote)
197
197
{
198
198
if (!node || !str)
199
199
return ;
@@ -206,7 +206,7 @@ void RapidJsonHandler::HandleArray(TreeNode *node, const char *const str, bool b
206
206
}
207
207
else
208
208
{
209
- node->node .key = std::to_string (node->counter );
209
+ node->node .key = " [ " + std::to_string (node->counter ) + " ] " ;
210
210
node->node .value = str;
211
211
node->counter ++;
212
212
}
0 commit comments