How to convert json array to java Object

Use com.amazonaws.util.json.Jackson
import com.amazonaws.util.json.Jackson;
import java.util.ArrayList;
import lombok.Data;

@Data
class DeviceList {
  private ArrayList<String> devices;
}

DeviceList deviceList = Jackson.fromJsonString(
    "{\"devices\":[\"Mobile\", \"Desktop\"]}", 
    DeviceList.class);

2 comments:

  1. If you're trying hard to lose weight then you have to get on this totally brand new custom keto diet.

    To produce this keto diet, certified nutritionists, personal trainers, and professional cooks have joined together to provide keto meal plans that are productive, convenient, price-efficient, and enjoyable.

    From their launch in 2019, 1000's of people have already transformed their body and health with the benefits a proper keto diet can give.

    Speaking of benefits: in this link, you'll discover eight scientifically-confirmed ones given by the keto diet.

    ReplyDelete

fixed: embedded-redis: Unable to run on macOS Sonoma

Issue you might see below error while trying to run embedded-redis for your testing on your macOS after you upgrade to Sonoma. java.la...