5

I'm using com.fasterxml.jackson.databind with Retrofit to handle the response from the server in my Android app.

Since the JSONObject response is too complicated and contains lots of JSONArray, I want to be able to parse some of those array fields into String instead of creating POJO for each sub-object that those Array could contains.

Is there a way I could just tell Jackson to keep those field as String and not parse them into Entities?

Jaythaking
  • 2,200
  • 4
  • 25
  • 67
  • check link http://www.baeldung.com/jackson-deserialization – Krish Apr 14 '16 at 17:38
  • 2
    Possible duplicate of [Jackson Deserialize Variable as Json String](http://stackoverflow.com/questions/8137060/jackson-deserialize-variable-as-json-string) – Adrian Baker Mar 08 '17 at 08:42
  • You can use annotation [`@JsonRawValue`](https://fasterxml.github.io/jackson-annotations/javadoc/2.0.0/com/fasterxml/jackson/annotation/JsonRawValue.html). – Thomas Fritsch Apr 28 '18 at 13:25

0 Answers0