void JSONObject::emplace( const String& key, const JSONValue& value ){ if( !key.empty() && value.isValid() ){ if( m_members.isNull() ){ m_members = new std::map<String, JSONValue>(); } m_members->insert( m_members->end(), std::make_pair( key, value ) ); } }
void JSONArray::appendValue( const JSONValue& value){ if( value.isValid() ){ if( m_elements.isNull() ){ m_elements = Elements( new std::vector<JSONValue>() ); } m_elements->push_back( value ); } }