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

Method isJsonObject

snap_drawing/src/snap_drawing/cpp/Utils/AnimatedImage.cpp:55–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53 // The classifier below would call a Lottie payload a JSON body. That is correct only while
54 // kLottieEnabled is true AND the JSON check precedes this branch, which routes Lottie away
55 // before it can get here. Where the check is compiled out, name the real cause instead.
56 if constexpr (!kLottieEnabled) {
57 if (isJsonObject(data, length)) {
58 const auto lottieMessage =
59 "Lottie payload in a build without Lottie support (" + describePayloadBytes(bytesView) + ")";
60 return Valdi::Error(std::string_view(lottieMessage));
61 }
62 }

Callers

nothing calls this directly

Calls 1

parseBeginObjectMethod · 0.80

Tested by

no test coverage detected