Skip to content

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

@cowtowncoder

Description

@cowtowncoder

(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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions