0

I have json where some of the field names are camel case some of the field names start with capital letter and some are completely upper case. JSON I am dealing with is highly nested and some times field names are repeated based on depth of the node when you convert nested json into tree.

Is there any easy way to generate POJO for this kind of JSON.

raju
  • 4,788
  • 15
  • 64
  • 119
  • 1
    Have you heard of [this website](http://www.jsonschema2pojo.org/) ? – Raptor Sep 26 '16 at 10:35
  • 2
    @JsonProperty if you use Jackson –  Sep 26 '16 at 10:35
  • I am using that library through http://stackoverflow.com/questions/29380069/jsonschema2pojo-not-generating-pojo-classes-from-json-string but I still face problem if the field name is not camel case. is there any way I can ask the library to attach @JsonProperty("FieldName") before every field? – raju Sep 26 '16 at 12:25
  • @SlimSoltaniDridi commented – raju Sep 26 '16 at 12:33
  • @Raptor commented – raju Sep 26 '16 at 12:33
  • http://www.jsonschema2pojo.org/ ? so are u using jackson ? –  Sep 26 '16 at 12:36
  • I am using org.jsonschema2pojo library to create pojos through code. Yes it indeed uses jackson @SlimSoltaniDridi – raju Sep 26 '16 at 12:38

0 Answers0