FasterXML / FasterXML/jackson-databind
Allow pre-definition of object ids before serialisation/deserialisation
- 主要语言
- Java
- 星标
- 3.7k
- 派生
- 1.5k
- 平均合并
- 3 天 6 小时
- 30 天内合并 PR
- 28
描述
I have an object model where some of the items come from a seperate library of objects and should always be serialised as ids and deserialised from the library of objects. I've been able to define an extension of DefaultDeserializationContext and DefaultSerializationProvider so that I can extend findObjectId but it's been very awkward, in particular because WritableObjectId has been marked final and doesn't have any facility to set the idWritten flag. Trying to set up a custom serializer and then use a beanserializermodifier has caused all kinds of problems with the objectid serializer not being properly initialised for some reason.
I've ended up hacking around the problem by putting my context/provider extensions in the same package as WritableObjectId and setting idWritten directly. Which isn't exactly a clean solution.
I'd like to request the facility to be able to register certain object/id combinations as external to the serialisation/deserialisation, with a simple API to allow external context to be registered.
I'd also like to request a review of the use of final on some classes, such as WritableObjectId. Or at the least, the provision of enough API to allow it to be used cleanly.
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。