Quantcast
Channel: XMl to JSON through java pojo using jackson - Stack Overflow
Browsing index pages (4 articles)

XMl to JSON through java pojo using jackson

I am trying to convert xml to json. First I created java class using the following xml...

View Article


Answer by Vitaly for XMl to JSON through java pojo using jackson

Problem in field naming, all fields by default starts with small letter.for example: compositeResponseTo avoid this problem add annotation @JsonProperty for each field, like this:...

View Article


Answer by Santosh for XMl to JSON through java pojo using jackson

Define you POJO like this,public class CompositeResponse { private List<CompositeIndividualResponse> compositeIndividualResponse; public List<CompositeIndividualResponse>...

View Article

Answer by Mohammad Hasan for XMl to JSON through java pojo using jackson

The solution is I do not need the Main.java class. Also I need to add jackson annotation to define xml element. The working code is following. CompositeResponse.java public class CompositeResponse {...

View Article
Browsing index pages (4 articles)


Latest Images