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);

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

Post a Comment

Popular posts from this blog

How to fix error : no module named sendgrid when try to use sendgrid python lib in PHP.

react-native run-android : sun.security.provider.cert path.SunCertPathBuilderException : unable to find valid certification path to req uested target

react-native run-android : do not build/update modified code(App.js)