diff options
Diffstat (limited to 'platform/android/src/gson/json_element.hpp')
| -rw-r--r-- | platform/android/src/gson/json_element.hpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/platform/android/src/gson/json_element.hpp b/platform/android/src/gson/json_element.hpp new file mode 100644 index 0000000000..7619350617 --- /dev/null +++ b/platform/android/src/gson/json_element.hpp @@ -0,0 +1,33 @@ +#pragma once + +#include <mapbox/geometry.hpp> +#include <mbgl/util/noncopyable.hpp> + +#include <jni/jni.hpp> + +namespace mbgl { +namespace android { +namespace gson { + +class JsonElement : private mbgl::util::noncopyable { +public: + static constexpr auto Name() { return "com/google/gson/JsonElement"; }; + + static mapbox::geometry::value convert(JNIEnv&, jni::Object<JsonElement>); + + static bool isJsonObject(JNIEnv&, jni::Object<JsonElement>); + + static bool isJsonArray(JNIEnv&, jni::Object<JsonElement>); + + static bool isJsonPrimitive(JNIEnv&, jni::Object<JsonElement>); + + static bool isJsonNull(JNIEnv&, jni::Object<JsonElement>); + + static jni::Class<JsonElement> javaClass; + + static void registerNative(jni::JNIEnv&); +}; + +} // namespace gson +} // namespace android +} // namespace mbgl
\ No newline at end of file |
