I looked up the code example at jsoncpp. For member array i.e "plug-ins" in json data below
{
// Default encoding for text
"encoding" : "UTF-8",
// Plug-ins loaded at start-up
"plug-ins" : [
"python",
"c++",
"ruby"
],
// Tab indent size
"indent" : { "length" : 3, "use_space": true }
}
they have not demonstrated a code snippet way to fill it from inside a program. Any one knows how to do it ? Thanks.
All these nodes are of type Json::Value
. You need to invoke Value & Json::Value::append (const Value & value)
To append an item into another.
While constructing a value object you pass type of Value which s an Enum Json::ValueType
and there is arrayValue
in that enum.