geozero icon indicating copy to clipboard operation
geozero copied to clipboard

Docs: Add example how to use with Serde

Open tobias47n9e opened this issue 1 year ago • 1 comments

I have a struct that uses:

#[derive(Debug, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct Item {
    pub id: i32,
    pub coordinates: Option<Decode<geo_types::Geometry<f64>>>,

The #[derive(Seralize)] produces the following error:

the trait Serialize is not implemented for geozero::wkb::Decode<geo_types::Geometry>

Would it be possible to add an example to the docs showing hot to serialize a struct fetched with sqlx using Serde?

tobias47n9e avatar Mar 12 '23 22:03 tobias47n9e

Any news about this?

sergiomeneses avatar Mar 05 '24 21:03 sergiomeneses