In a project of mine, I needed to parse Composer's composer.json files using C#. I wanted to make this work on both Windows and Unix systems, using Microsoft's .NET Framework on Windows and Mono inside my Ubuntu virtualbox.
I was parsing the JSON using the DataContractJsonSerializer class, which I'd instantiated and used as follows:
var settings = new DataContractJsonSerializerSettings {
UseSimpleDictionaryFormat = true
};
var json = new DataContractJsonSerializer(typeof(Composer), settings);