Skip to content
JsonData

SetArrayData

JsonArray& SetArrayData(const JsonArray data)
JsonArray& SetArrayData(const std::vector<JsonData> data)

Will set this JsonData's JsonArray-data to a copy of data, and will set its type to ARRAY.

Returns a reference to the the copy actually stored in this JsonData.


What does JsonArray-data actually represent? For example the value of names:

{
    "names": [
        "Peter",
        "Lois",
        "Brian",
        "Megatron"
    ]
}

Aliases

Alternative ways to call this function

  • myJsonData = myJsonArray;
  • myJsonData =Arr{5, 6, 7, 8, "hello"};