MCPcopy Create free account
hub / github.com/Snapchat/Valdi / parseBool

Method parseBool

valdi_core/src/valdi_core/cpp/Utils/JSONReader.cpp:336–347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

334}
335
336bool JSONReader::parseBool(bool& output) {
337 if (tryParseToken("true")) {
338 output = true;
339 return true;
340 } else if (tryParseToken("false")) {
341 output = false;
342 return true;
343 } else {
344 _parser.setErrorAtCurrentPosition("Expected boolean");
345 return false;
346 }
347}
348
349bool JSONReader::parseNull() {
350 return parseToken("null");

Callers 1

readValueFromJSONReaderFunction · 0.80

Calls 1

Tested by

no test coverage detected