1#ifndef TENDUKE_JSON_SIMPLEJSONARRAY_H
2#define TENDUKE_JSON_SIMPLEJSONARRAY_H
4#include "json/JSONArray.h"
6#include "./SimpleJSONElement.h"
21 return values.empty();
29 const std::vector<std::shared_ptr<::tenduke::json::JSONElement>> &
getValues()
const override
36 std::string result =
"[";
38 for (
const auto& v : values) {
45 result += v->asJSON();
50 virtual void add(
const std::shared_ptr<::tenduke::json::JSONElement> element)
52 values.emplace_back(element);
56 std::vector<std::shared_ptr<::tenduke::json::JSONElement>> values;
A JSON array.
Definition JSONArray.h:16
std::string asJSON() const override
Serializes the element as JSON.
Definition SimpleJSONArray.h:34
std::size_t getSize() const override
Returns number of elements in the array.
Definition SimpleJSONArray.h:24
bool isEmpty() const override
Checks if the array is empty.
Definition SimpleJSONArray.h:19
const std::vector< std::shared_ptr<::tenduke::json::JSONElement > > & getValues() const override
Returns the elements of the array.
Definition SimpleJSONArray.h:29
Definition SimpleJSONElement.h:11
JSON support.
Definition JSONArray.h:10
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4