summaryrefslogtreecommitdiff
path: root/platform/node/src/node_geojson.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/node/src/node_geojson.hpp')
-rw-r--r--platform/node/src/node_geojson.hpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/platform/node/src/node_geojson.hpp b/platform/node/src/node_geojson.hpp
index 9bae86b76a..8a3927e2cf 100644
--- a/platform/node/src/node_geojson.hpp
+++ b/platform/node/src/node_geojson.hpp
@@ -1,13 +1,15 @@
#include <mbgl/style/conversion/geojson.hpp>
+#include <string>
namespace mbgl {
namespace style {
namespace conversion {
template <>
-optional<GeoJSON> Converter<GeoJSON>::operator()(const v8::Local<v8::Value>&, Error& error) const {
- error = { "not implemented" };
- return {};
+optional<GeoJSON> Converter<GeoJSON>::operator()(const v8::Local<v8::Value>& value, Error& error) const {
+ Nan::JSON JSON;
+ std::string string = *Nan::Utf8String(JSON.Stringify(value->ToObject()).ToLocalChecked());
+ return convert<GeoJSON>(string, error);
}
} // namespace conversion