Generally JSON is converted to & from definite objects. But I had a requirement where we wished to load json into an array/list where data will be stored in key/value pairs.
- Code to Convert JSON String into following:
- List<KeyValuePair<String, String>>
- List< StringField >
- StringFields
Where, class StringField has two properties, viz. Name & Value. StringFields is IEnumerable
I could not find any readymade solution So I created this one.
I hope it may be useful to others too.
Thank you.