Skip to content
JsonArray

Add

JsonData& Add()

JsonData& Add(const bool data)
JsonData& Add(const int data)
JsonData& Add(const long long int data)
JsonData& Add(const double data)
JsonData& Add(const long double data)
JsonData& Add(const std::string data)
JsonData& Add(const char data[])
JsonData& Add(const JsonData data)
JsonData& Add(const JsonArray data)
JsonData& Add(const JsonBlock data)

void Add(const std::vector<bool> data)
void Add(const std::vector<int> data)
void Add(const std::vector<long long int> data)
void Add(const std::vector<double> data)
void Add(const std::vector<long double> data)
void Add(const std::vector<std::string> data)
void Add(const std::vector<JsonData> data)
void Add(const std::vector<JsonArray> data)
void Add(const std::vector<JsonBlock> data)

Will add values to the Array.

  • If you call Add() without any values, a null-element will be added. A reference to that will be returned.
  • If you call Add() with a single value, a reference to the created JsonData object will be returned.
  • If you call Add() via a vector of values, they will all be added.

Aliases

Alternative ways to call this function

  • myArray +=JsonData("hello")
  • myArray += "hello"
  • myArray += Arr{1, 2, 3, 4, "hello"}
  • myArray += JsonArray(Arr{1, 2, 3, 4, "hello"}) To add the an array to the array as one element