How to use jackson to deserialize nested json fields to objects

< H2 > how to use jackson to deserialize nested json fields to objects < / H2 >
{
"id":1,
"name":"Bitcoin",
"quote":{
"USD":{
"price":9283.92,
"market_cap":158055024432
}
}
}

deserialize the above json to the following object

public class TokenInfo implements Serializable {
    private String name;
    private String id;
    private BigDecimal price;
    private BigDecimal marketCap;
}

can be handled manually, but I don"t want to repeat it if jackson supports it by default.

has anyone ever encountered such a scenario, please give us some advice on the solution

Sep.07,2021

allows your TokenInfo class to have a field quote , and the quote field is the class Quote (you need to declare it). It's been nested all the time.
tokenInfo.getQuote (). GetUSD (). GtPrice () take a value like this.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bed8d6-39f44.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bed8d6-39f44.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?