joelittlejohn / jsonschema2pojo

Generate Java types from JSON or JSON Schema and annotate those types for data-binding with Jackson, Gson, etc

Home Page:http://www.jsonschema2pojo.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Different classes are generated for the same named attribute at a different JSONPath location

ulviugur opened this issue · comments

Hi,

I have the same attribute ("lastEdit") at different location in the JSON tree and POJO converter creates 2 different classes : LastEdit__1 and LastEdit.

Is there a way to declare that both of these attributes are the same and no need to create a dedicated new Class ? Could not find anything relevant in the "Reference" section.

Cheers,
Geo

commented

Hi

Is there a way to declare that both of these attributes are the same and no need to create a dedicated new Class ?

In case source type is JSON and the structure is similar to defined here then at present it's not possible

Yes, I use JSON as it is more practical / pragmatic.