mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-02 00:38:26 +01:00
Test that CreateObject() returns an empty JsonObject
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "JsonBuffer.h"
|
||||
#include "JsonObject.h"
|
||||
|
||||
template<int CAPACITY>
|
||||
class StaticJsonBuffer //: public JsonBuffer
|
||||
@@ -14,11 +15,12 @@ public:
|
||||
|
||||
virtual ~StaticJsonBuffer() {}
|
||||
|
||||
/*JsonObject*/
|
||||
void createObject()
|
||||
JsonObject createObject()
|
||||
{
|
||||
if (_size < CAPACITY)
|
||||
_size++;
|
||||
|
||||
return JsonObject();
|
||||
}
|
||||
|
||||
int capacity()
|
||||
|
||||
Reference in New Issue
Block a user