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

❤️ Support This Blog


If this post helped you, you can support my writing with a small donation. Thank you for reading.


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

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

Copying MDC Context Map in Web Clients: A Comprehensive Guide

Reset user password for your own Ghost blog