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

Function jsonToValue

valdi/test/runtime/ValueUtils_tests.cpp:23–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21enum class JSONParseMode { PREFER_CORRECTNESS = 0, PREFER_PERFORMANCE = 1 };
22
23static Result<Value> jsonToValue(const std::string_view& str, JSONParseMode parseMode) {
24 switch (parseMode) {
25 case JSONParseMode::PREFER_CORRECTNESS:
26 return correctJsonToValue(str);
27 case JSONParseMode::PREFER_PERFORMANCE:
28 return fastJsonToValue(str);
29 }
30}
31
32class ValueUtilsFixture : public ::testing::TestWithParam<JSONParseMode> {
33public:

Callers 14

TEST_PFunction · 0.70
flattenValueFunction · 0.70
TESTFunction · 0.70
processMessageMethod · 0.50
setTargetListMethod · 0.50
parseMethod · 0.50
populateSourceMapMethod · 0.50
consumeBufferedDataMethod · 0.50
onHermesMessageMethod · 0.50
onDataReceivedMethod · 0.50

Calls 2

correctJsonToValueFunction · 0.85
fastJsonToValueFunction · 0.85

Tested by

no test coverage detected