MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / array

Method array

source/core/StarFormattedJson.cpp:445–453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443}
444
445FormattedJson FormattedJson::array(ElementList const& elements) {
446 FormattedJson json = ofType(Json::Type::Array);
447 for (JsonElement const& elem : elements) {
448 if (elem.is<ColonElement>() || elem.is<ObjectKeyElement>())
449 throw JsonException("Invalid FormattedJson element in Json array");
450 json.appendElement(elem);
451 }
452 return json;
453}
454
455FormattedJson FormattedJson::objectInsert(String const& key, FormattedJson const& value, ElementLocation loc) const {
456 if (type() != Json::Type::Object)

Callers 3

handleIncomingPacketsMethod · 0.45
queueUpdatePacketsMethod · 0.45

Calls 1

appendElementMethod · 0.80

Tested by

no test coverage detected