Given a Json, how do we get all the keys in it ? Just the keys. For example, Consider the Json below. Given the above Json, you would like to get all the keys. You might be later interested to show this as a Menu or Dropdown, that's down to the requirements. But, how do … Continue reading Json : Fetch all keys using Linq
Tag: JSON
Json Recipes
Here are few quick recipes with Newtonsoft.Json Recipe 01 : Convert Json to XML One way to convert a Json to XML would be to convert Json to intermediate class structure and then serialize the class using XMLSerializer. But why go the long way when you can do it directly. Let's check the code straightaway. … Continue reading Json Recipes
Serialize Deserialize NameValueCollection
Don't ask me why one cannot Serialize/Deserialize a NameValueCollection, but the workaround for the same is based on conversion to dictionary. I ended up writing extension methods to NameValueCollection for serializing and deserializing the collection.