mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-15 19:42:12 +02:00
Implement Printable
This commit is contained in:
@ -9,33 +9,6 @@
|
||||
|
||||
using namespace ArduinoJson::Internals;
|
||||
|
||||
//JsonValue& JsonObject::operator[](char const* key)
|
||||
//{
|
||||
// addNodeAt(key, innerObject._node);
|
||||
// return innerObject;
|
||||
//}
|
||||
//
|
||||
//void JsonObject::addNodeAt(const char* key, JsonNode& node)
|
||||
//{
|
||||
// JsonNode& keyNode = _buffer.createNode();
|
||||
// keyNode.becomeKey(key, node);
|
||||
// appendChild(keyNode);
|
||||
//}
|
||||
//
|
||||
//void JsonObject::appendChild(JsonNode& newChild)
|
||||
//{
|
||||
// JsonNode* lastChild = _node.asObjectNode.child;
|
||||
// while (lastChild->next)
|
||||
// {
|
||||
// lastChild = lastChild->next;
|
||||
// }
|
||||
//
|
||||
// if (lastChild)
|
||||
// lastChild->next = &newChild;
|
||||
// else
|
||||
// _node.asObjectNode.child = &newChild;
|
||||
//}
|
||||
|
||||
size_t JsonObject::size()
|
||||
{
|
||||
JsonNode* firstChild = _node->content.asObject.child;
|
||||
@ -94,13 +67,13 @@ JsonNode* JsonObject::getOrCreateNodeAt(char const* key)
|
||||
return newValueNode;
|
||||
}
|
||||
|
||||
void JsonObject::printTo(char* buffer, size_t bufferSize) const
|
||||
size_t JsonObject::printTo(char* buffer, size_t bufferSize) const
|
||||
{
|
||||
StringBuilder sb(buffer, bufferSize);
|
||||
printTo(sb);
|
||||
return printTo(sb);
|
||||
}
|
||||
|
||||
void JsonObject::printTo(Print& p) const
|
||||
size_t JsonObject::printTo(Print& p) const
|
||||
{
|
||||
p.print("{}");
|
||||
return p.print("{}");
|
||||
}
|
Reference in New Issue
Block a user