Function geojson::ser::to_feature_string

source ·
pub fn to_feature_string<T>(value: &T) -> Result<String>
where T: Serialize,
Expand description

Serialize a single data structure to a GeoJSON Feature string.

Note that T must have a column called geometry.

See to_feature_collection_string if instead you’d like to serialize multiple features to a FeatureCollection.

§Errors

Serialization can fail if T’s implementation of Serialize decides to fail, or if T contains a map with non-string keys.