Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Box2D & Box3D aren't json serializable #36

Closed
ahawlitschek opened this issue Mar 30, 2023 · 1 comment · Fixed by #127
Closed

Box2D & Box3D aren't json serializable #36

ahawlitschek opened this issue Mar 30, 2023 · 1 comment · Fixed by #127
Labels
enhancement New feature or request

Comments

@ahawlitschek
Copy link
Member

ahawlitschek commented Mar 30, 2023

Since Geojson has no geometry type for box, we had not implemented the interface providing the necessary code to serialize it.
@saibotk I would suggest we add a custom serialization besides the JsonGenerator that returns all 4 floats as array (as accepted by most of the frontend map libraries)

@saibotk
Copy link
Member

saibotk commented Apr 29, 2023

Sounds good,

But we may also want to look into https://datatracker.ietf.org/doc/html/rfc7946#section-5
and see if there are any available usecases for also supporting bbox properties on GeoJson in Magellan.

@saibotk saibotk added the enhancement New feature or request label Apr 29, 2023
saibotk added a commit that referenced this issue Jan 3, 2025
Box classes now implement `JsonSerializable` and serialize to float arrays, which is a common format in frontend libraries.

Fixes #36
saibotk added a commit that referenced this issue Jan 3, 2025
Box classes now implement `JsonSerializable` and serialize to float arrays, which is a common format in frontend libraries.

Fixes #36
@saibotk saibotk linked a pull request Jan 3, 2025 that will close this issue
@saibotk saibotk closed this as completed Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants