Standardizing and fixing serialization#161
Standardizing and fixing serialization#161MatejMa2ur merged 3 commits intoYet-another-solution:mainfrom
Conversation
|
Note that this removed the simple type that was created for callbacks. This is a breaking change, but will allow for more data in the future. |
| [JsonPolymorphic(TypeDiscriminatorPropertyName = "type")] | ||
| [JsonDerivedType(typeof(FeatureCollection), "FeatureCollection")] |
There was a problem hiding this comment.
Does this work without a problem?
There was a problem hiding this comment.
In my testing, yes. The data is returned from MapLibre using the type property, and the type descriminator is FeatureCollection. So STJ can handle everything for us for serial and deserial
|
Hi, I am mainly asking, because the code seem fine, I just do not fully understand what will be the breaking change. |
The |
Been diving a bit deeper into the library to fix the issues that we're having with the current preview as the serialization process is a bit strange from a normal STJ pattern.
The following changes fixes callbacks having out of order type params and fully supporting serialization and deserialization of all the existing polymorphic types.
Layers is still a bit of a beast due to the way that the properties are setup, but I'll have a pass on the OneOf serialization process to see if we can support the built-in types mixing with normal types.