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

Add a new ObjectIdGenerator, StringIdGenerator, to allow arbitrary String Object Id usage #77

Closed
cowtowncoder opened this issue Dec 26, 2015 · 0 comments
Milestone

Comments

@cowtowncoder
Copy link
Member

(note: based on idea from https://github.com/FasterXML/jackson-dataformat-yaml/issues/45)

There is one possibly common use case with Object Ids: one where no generation is needed, but source ids are String ids with arbitrary structure (or, possibly, none) and where the only important thing from Jackson perspective is that they are unique ids.

In addition to allow use of "opaque" Object Ids, generation side could either:

  1. Throw an exception if attempted, to only for deserialization, OR
  2. Use Random UUID generation, similar to UUIDGenerator

For now I think (2) makes more sense, as it actually will work just fine. If anyone wants to disallow this, or change it, they may then simply override implementation method(s).

@cowtowncoder cowtowncoder added this to the 2.7.0-rc3 milestone Dec 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant