Skip to content

Add support for Jackson (and other?) annotations #425

@mechite

Description

@mechite

Sometimes it is common for an existing project to be using either

  • JSON-B (e.g. @JsonbProperty)
  • Jackson (e.g. @JsonProperty)
  • GSON (e.g. @SerializedName)

annotations in a big data model with a lot of POJOs.

I think in the generator, especially considering we already have jsonb-jackson, it would be nice to support some of these annotations, maybe with separate modules.

Supporting any other semantics from these JSON libraries is not desirable.
Just the annotations being an optional feature, can be nice, also for adapting legacy code.


For me, it solves an issue where I want to use telegrambots-meta, where the api package is a big data model.
To create a webhook bot, I plan to use avaje-http using e.g. org.telegram.telegrambots.meta.api.objects.Update as a body POJO.

@Json.Import does not cut it, as the property names for the Telegram API are all different, to what any suitable field name would be.
I have other use cases as well where this functionality would be nice to have.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions