JsonObject.h 505 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include "JsonContainer.h"
  3. class JsonValue;
  4. struct JsonNode;
  5. class JsonObject : public JsonContainer
  6. {
  7. friend JsonValue;
  8. public:
  9. JsonObject()
  10. {
  11. }
  12. explicit JsonObject(JsonNode* node)
  13. : JsonContainer(node)
  14. {
  15. }
  16. size_t size();
  17. JsonValue operator[](const char* key);
  18. void remove(const char* key);
  19. bool operator==(const JsonObject& other) const;
  20. private:
  21. JsonNode* getOrCreateNodeAt(char const* key);
  22. };