Skip to content

re-export serde error#276

Merged
michaelkirk merged 1 commit into
mainfrom
mkirk/re-export-serde-error
Apr 28, 2026
Merged

re-export serde error#276
michaelkirk merged 1 commit into
mainfrom
mkirk/re-export-serde-error

Conversation

@michaelkirk
Copy link
Copy Markdown
Member

@michaelkirk michaelkirk commented Apr 20, 2026

  • I agree to follow the project's code of conduct.
  • I added an entry to CHANGES.md if knowledge of this change could be valuable to users.

Fixes #240

We are already re-exporting some serde objects, so this doesn't create a new semver contract that wasn't already there.

And this way downstream users can interact with the error type without having to explicitly install serde_json.

Fixes #240

We are already re-exporting some serde objects, so this doesn't create a
new semver contract that wasn't already there.

And this way downstream users can interact with the error type without
having to explicitly install serde_json.
@michaelkirk michaelkirk force-pushed the mkirk/re-export-serde-error branch from 84dfef6 to 76f5a4d Compare April 20, 2026 22:44
Comment thread src/lib.rs

pub type JsonValue = serde_json::Value;
pub type JsonObject = serde_json::Map<String, JsonValue>;
pub type MalformedGeoJsonError = serde_json::Error;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I struggled with the name a little bit. At first I though JsonError, but to me that implies only that there was some problem with the Json. However, we also use this to validate geojson schema - e.g. a missing "features" key for a feature collection. It's valid JSON, but not valid GeoJson.

@michaelkirk michaelkirk added this pull request to the merge queue Apr 28, 2026
Merged via the queue into main with commit ad7ee95 Apr 28, 2026
3 checks passed
@michaelkirk michaelkirk deleted the mkirk/re-export-serde-error branch April 28, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Re-expose serde_json::error::Error

2 participants