有一个像“ [[7], [2,2,3]]”这样的字符串。
[[7], [2,2,3]]
如何将此字符串转换为List<List<Integer>>对象?
List<List<Integer>>
这是为了在 JUnit5 中实现一个参数转换器。
@CsvSource({ "'[2,3,6,7]', 7, '[[7], [2, 2, 3]]'" })
我想将字符串“ [[7], [2,2,3]]”转换为List<List<Integer>>对象。
java junit5
java ×1
junit5 ×1