在我的应用程序中,需要将大量数据转换为CSV并读取CSV。我在哪里面临转换Strings to Collection Type
的问题。例如,我在CSV文件中有一行,如下所示,
1,{'Id_101', 'Id_102', 'Id_103'}
在我的代码中,我将使用String[]
变量So,
arr[0] will hold 1
arr[1] will hold {'Id_101', 'Id_102', 'Id_103'}
我知道arr[1] value is Set (It is static)
的数据类型。我需要转换{'Id_101', 'Id_102', 'Id_103'} to Set<String>
。
类似地for Map too
,输入将类似{ "keyA": "ValA", "keyB": "ValB" }
(我知道String类型为Set时以及字符串是Map时,因为它是静态的)
是否有可用的第三方API?我不喜欢使用String操作。需要使用任何第三方API实现..
答案 0 :(得分:0)
=RAND()