MCPcopy Create free account
hub / github.com/Tracktion/choc / parseArray

Method parseArray

choc/text/choc_JSON.h:327–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

325 }
326
327 value::Value parseArray()
328 {
329 auto result = value::createEmptyArray();
330 auto arrayStart = current;
331
332 skipWhitespace();
333 if (popIf (']')) return result;
334
335 for (;;)
336 {
337 skipWhitespace();
338 if (isEOF()) throwError ("Unexpected EOF in array declaration", arrayStart);
339
340 result.addArrayElement (parseValue());
341 skipWhitespace();
342
343 if (popIf (',')) continue;
344 if (popIf (']')) break;
345 throwError ("Expected ',' or ']'");
346 }
347
348 return result;
349 }
350
351 value::Value parseObject()
352 {

Callers

nothing calls this directly

Calls 4

createEmptyArrayFunction · 0.85
throwErrorFunction · 0.85
parseValueFunction · 0.85
addArrayElementMethod · 0.80

Tested by

no test coverage detected