mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-16 03:52:16 +02:00
Parse invalid array
This commit is contained in:
@ -1,9 +1,7 @@
|
||||
#include "JsonBuffer.h"
|
||||
|
||||
#include <new>
|
||||
#include <string.h> // for memset
|
||||
|
||||
#include "JsonObject.h"
|
||||
#include "JsonValue.h"
|
||||
#include "Internals/JsonNode.h"
|
||||
|
||||
@ -20,7 +18,19 @@ JsonNode* JsonBuffer::createNode()
|
||||
return new (node) JsonNode();
|
||||
}
|
||||
|
||||
JsonArray JsonBuffer::parseArray(char const *string)
|
||||
JsonArray JsonBuffer::parseArray(const char* json)
|
||||
{
|
||||
return JsonArray();
|
||||
JsonNode* root;
|
||||
|
||||
if (json[0] == '[')
|
||||
{
|
||||
root = createNode();
|
||||
root->setAsArray(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
root = 0;
|
||||
}
|
||||
|
||||
return JsonArray(root);
|
||||
}
|
Reference in New Issue
Block a user