This project has moved. For the latest updates, please go here.


problem with WriteRaw inside of Collections


If I write a converter for a custom object

class MyObjectConverter : JsonConverter
            private static Type dataType = typeof(MyObject);

            public override bool CanConvert(Type objectType)
                return objectType == dataType;

            public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
                var d = value as MyObject;
Everything is fine unless I have a collection of MyObject
If I have a collection the serialization appears as
[{} {}] // note without the comma.

I am going to look into why this is occuring, but still working my way through the code and wondering if someone else has seen this issue.
Closed Mar 7, 2013 at 9:24 PM by JamesNK
Use StackOverflow please