Test that adding the same value twice doesn't increase the size of the object

This commit is contained in:
Benoit Blanchon
2014-09-27 14:43:19 +02:00
parent 166bdd6919
commit a2fc188526
10 changed files with 146 additions and 32 deletions

View File

@ -24,27 +24,20 @@ class JsonObject
public:
JsonObject(JsonBuffer* buffer)
: _size(0), _buffer(buffer)
JsonObject(JsonBuffer* buffer, JsonNode* node)
: _buffer(buffer), _node(node)
{
}
int size()
{
return _size;
}
size_t size();
JsonValue operator[](const char* key);
private:
int _size;
JsonBuffer* _buffer;
//JsonNode* _node;
//
// void addNodeAt(char const* key, JsonNode& node);
// JsonNode& getNodeAt(const char* key);
JsonNode* _node;
JsonNode* getOrCreateNodeAt(char const* key);
//
// // TODO: pull up
// void appendChild(JsonNode& newChild);