This project is read-only.

Anonymous type serialization returns empty result

Mar 17, 2014 at 12:12 PM
Should this be the case? I only get "{}" returned.

The codeproject page says that support for Anonymous types has been added.
Mar 17, 2014 at 12:20 PM
Just realised that I added the following before the serialization: fastJSON.JSON.Instance.Parameters.UseExtensions = false;

This is the cause for the empty result. But the support for Anonymous types isn't really what I expected, here's an example:
var fastJson = fastJSON.JSON.Instance.ToJSON(new { test = "1",test1 = 2,test2 = '3' });
            Console.ReadLine();
returns:
{
    "$types": {
        "<>f__AnonymousType0`3[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Char, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], ConsoleApplication1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null": "1"
    },
    "$type": "1"
}