| Crates.io | esri_json |
| lib.rs | esri_json |
| version | 0.1.1 |
| created_at | 2026-01-12 15:13:29.744043+00 |
| updated_at | 2026-01-14 12:29:39.530746+00 |
| description | Serializing and Deserializing Esri JSON using serde |
| homepage | |
| repository | https://github.com/cookiedan42/esri_json |
| max_upload_size | |
| id | 2037983 |
| size | 164,127 |
A crate for reading and writing Esri JSON
This crate provides representations of Esri JSON objects with serde::Deserialize and serde::Serialize trait implementations.
The primary purpose of this crate is to convert geospatial data processed with geo into Graphic objects for display in a WebScene component of an ArcGIS Maps SDK for JavaScript application.
Inspired by the serde_esri crate
geo_types
geo_type feature flaguse esri_json::geometry::{Coord,CoordXy,Point};
use esri_json::js_sdk::graphics_layer;
use esri_json::webmap::esri_sms::*;
use serde_json::Map;
let geometry: Point<CoordXy> = Point::new(CoordXy::new(0.0, 0.0), None);
let sms = EsriSMS::default()
.angle(1.0)
.color(Color::Rgb(1, 1, 1))
.outline(Outline::default())
.size(1.0)
.style(Style::esriSMSCircle)
.xoffset(1.0)
.yoffset(1.0);
let _g = graphics_layer::Graphic::<Point<CoordXy>>::new(geometry)
.attributes(Map::new())
.symbol(sms);
More examples are in the tests crate
id field not supported
fields are not validated
Symbologies needed for visualizing supported Geometries can be serialized, deserialized and edited too
aggregateGeometries not supported
popupTemplate partially supported, only Title and Content are serialized as String
Symbologies for Point,Polygon,Polyline,Multipoint Geometries are included
Symbologies are built up using the Builder pattern, starting from a ::default() method and adding fields one by one
Licensed under Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)