opendatalab-de / geojson-jackson

GeoJson POJOs for Jackson - serialize and deserialize objects with ease
http://blog.opendatalab.de
Apache License 2.0
263 stars 94 forks source link

Issue 34 support foreign members #48

Closed ggalmazor closed 4 years ago

ggalmazor commented 5 years ago

Hi all!

I've been modifying this library to make it fit our needs back at https://github.com/opendatakit/briefcase/issues/661 and I thought that the changes I've made could be of interest.

We've basically added support for Foreign Members thanks to the @JsonAnyGetter Jackson annotation, which adds dynamic properties to the serialized JSON objects.

We've tested this on serialization so far and it probably needs some changes to work on deserialization.

I wanted to create the PR in case it inspires someone to follow this.

I think that deserialization could probably work with some well placed @JsonCreator annotations on constructors and I could probably work on this in the following weeks if this gets traction from this community.

I've tried to produce small, self-explaining commits. I hope it's easy to review.

ggalmazor commented 5 years ago

Hi, @grundid! Is this project active?

grundid commented 5 years ago

Hi. Thank you for your PR. I guess the foreign members have been introduced in the new RFC 7946. This library is still based on the original GeoJSON 2008 spec. I wanted to update this library to support the RFC 7946 but had no time so far. Do you know what other features we need to support the full RFC?

ggalmazor commented 5 years ago

Thanks for answering, @grundid :)

Let me study the differences between the two versions and come back to you with an answer.

This library has been very useful so far for us at https://github.com/opendatakit and I would be glad to help more

ggalmazor commented 4 years ago

Sorry for letting this hang here unattended :( I didn't have time to see through it and this won't change in the foreseeable future.

I'm closing this PR to let anyone retake this idea.