Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have problems to deserialize some nested Json.

The json : JSON LINK HERE

To deserialize :

And the two classes :

I'm getting this Exception :

com.fasterxml.jackson.databind.JsonMappingException: Unrecognized Type: [null]

Any suggestions?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
169 views
Welcome To Ask or Share your Answers For Others

1 Answer

suppose you have missed two properties in your RandomBixi Class.

class RandomBixi {
@JsonProperty("id")
int id;
@JsonProperty("s")
String nom;
@JsonProperty("n")
int idTerminal;
@JsonProperty("st")
int etatStation;
@JsonProperty("b")
boolean bloque;
@JsonProperty("su")
boolean suspendue;
@JsonProperty("m")
boolean hs;
@JsonProperty("lu")
int lu;
@JsonProperty("lc")
int lc;
@JsonProperty("bk")
boolean bk;
@JsonProperty("bl")
boolean bl;
@JsonProperty("la")
String latitude;
@JsonProperty("lo")
String longitude;
@JsonProperty("da")
int borneDispo;
@JsonProperty("dx")
int dx;
@JsonProperty("ba")
int bixiDispo;
@JsonProperty("bx")
int bx;

  getters ans setters....
}

If you don't want all the properties to be mapped use @JsonIgnore on the property.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...