[英]Convert a JSON into a list of key value pair
I have a string which has multiple JSON in it of the format: 我有一个字符串,其中包含多个JSON,格式为:
ID,{JSON},
ID,{JSON},
ID,{JSON}
I want to convert this into a list of key-value pairs in which each key-value pair is of the format mentioned below: 我想将其转换为键值对的列表,其中每个键值对的格式如下:
{
Key: "ID",
Value: {JSON}
}
Let me know how I can achieve this. 让我知道如何实现这一目标。
您可以将字符串转换为具有两个属性键和值的可序列化类,然后对其进行序列化。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.