#pragma once #include "../value.hpp" #include #include #include #include #include namespace mbgl { namespace style { namespace conversion { template <> optional convertGeoJSON(const mbgl::android::Value& value, Error& error) { // Value should be a string wrapped in an object mbgl::android::Value jsonValue = value.get("data"); if(value.isNull()) { error = { "no json data found" }; return {}; } return convertGeoJSON(value.get("data").toString(), error); } template <> struct Converter { optional operator()(const mbgl::android::Value& value, Error& error) const { return convertGeoJSON(value, error); } }; } // namespace conversion } // namespace style } // namespace mbgl