Feb 24, 2012, 7:24 PM
Allow list of JSON serializers to be customised
I have a class with a property of type MongoDB.Bson.ObjectId. When this is serialized using the default set of serializers in Ext.NET, it comes back as an empty string. I would like to be able to add my own JsonSerializer to the list in the Ext.Net.JSON class, but this isn't possible, because the serializers are returned from a public static property getter and are cached in a private static variable.
I've got a current nasty hack to use reflection to get the private static field, cast it as a List<JsonConverter>, and add my converter to that, but I'd really rather not :)
I've got a current nasty hack to use reflection to get the private static field, cast it as a List<JsonConverter>, and add my converter to that, but I'd really rather not :)