FasterXML / jackson-annotations

Core annotations (annotations that only depend on jackson-core) for Jackson data processor
https://github.com/FasterXML/jackson
Apache License 2.0
1.03k stars 330 forks source link

Add `maySerializeAsObject()` and `maySerializeAsObject()` in `ObjectIdGenerator` to support JSOG #50

Closed cowtowncoder closed 9 years ago

cowtowncoder commented 9 years ago

(note: related to https://github.com/FasterXML/jackson-databind/issues/622)

Since there are potential drawbacks/ambiguities to handling (JSON) Object serialized object ids (since basically it makes it impossible to reliably know object definition and reference from each other, without considering actual Object contents -- something that scalar ids allow), let's require ObjectIdGenerators for object-value object ids to implement a new method.