How to transform a nested list of double values into a Java class using RxJava?

后端 未结 3 1277
灰色年华
灰色年华 2021-01-27 00:18

In my Android client I receive this JSON data from a backend:

[
    [
        1427378400000,
        553
    ],
    [
        1427382000000,
        553
    ]
]
         


        
3条回答
  •  广开言路
    2021-01-27 01:01

    List productLevels = new ArrayList<>();
    for(List p: list) {
        productLevels.add(new ProductLevel(p.get(0),p.get(1)));
    }
    

    I think it should work.

提交回复
热议问题