MCPcopy Create free account
hub / github.com/BernardoGiordano/Checkpoint / ckpt_json_array_size

Function ckpt_json_array_size

common/script/json_api.cpp:153–156  ·  view source on GitHub ↗

nlohmann's size(): array/object element count, 1 for scalars, 0 for null.

Source from the content-addressed store, hash-verified

151
152// nlohmann's size(): array/object element count, 1 for scalars, 0 for null.
153void ckpt_json_array_size(struct ParseState* Parser, struct Value* ReturnValue, struct Value** Param, int NumArgs)
154{
155 ReturnValue->Val->Integer = (int)tree(ScriptArgs(Parser, Param, NumArgs, "json_array_size"), 0)->size();
156}
157
158void ckpt_json_array_element(struct ParseState* Parser, struct Value* ReturnValue, struct Value** Param, int NumArgs)
159{

Callers

nothing calls this directly

Calls 3

treeFunction · 0.85
ScriptArgsClass · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected