Reputation: 69
I have a string which has multiple JSON in it of the format:
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.
Upvotes: 0
Views: 393
Reputation: 1033
You could convert your strings into a serializable class with two properties key and value and serialize it.
Upvotes: 1