MCPcopy Create free account
hub / github.com/FastLED/FastLED / json

Method json

src/fl/net/http/fetch.cpp.hpp:649–661  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

647// ========== Response Class Method Implementations ==========
648
649fl::json Response::json() const {
650 if (!mJsonParsed) {
651 if (is_json() || mBody.find("{") != fl::string::npos || mBody.find("[") != fl::string::npos) {
652 mCachedJson = parse_json_body();
653 } else {
654 FL_WARN("Response is not JSON: " << mBody);
655 mCachedJson = fl::json(nullptr); // Not JSON content
656 }
657 mJsonParsed = true;
658 }
659
660 return mCachedJson.has_value() ? *mCachedJson : fl::json(nullptr);
661}
662
663} // namespace http
664} // namespace net

Callers

nothing calls this directly

Calls 3

jsonClass · 0.50
findMethod · 0.45
has_valueMethod · 0.45

Tested by

no test coverage detected