#pragma once #include #include #include namespace mbgl { namespace style { namespace conversion { template optional convertJSON(const std::string& json, Error& error, Args&&...args) { JSDocument document; document.Parse<0>(json.c_str()); if (document.HasParseError()) { error = { formatJSONParseError(json, document) }; return {}; } return convert(document, error, std::forward(args)...); } } // namespace conversion } // namespace style } // namespace mbgl