1

Closed

serializing an object give null value

description

hi

i have dynamicvalue class. using this class i created one dynamivalue and try to convert to string using JsonConvert.SerializeObject(object) method.but it gives partial output .the code following..


for dynamicvalue check out it here
http://msdn.microsoft.com/en-us/library/windowsazure/jj193441(v=azure.10).aspx
DynamicValue a = "new";
            DynamicValue inputdynamicvalue = new DynamicValue();
            inputdynamicvalue.Add("a", a);
the resulting dynamic value will be like this inputdynamicvalue = {"a":"new"}

when i tried to serialize i didn't get the value ..like
   string Result=   JsonConvert.SerializeObject(inputdynamicvalue);
i got result like this Result={"a":{}}

i expected result is Result={"a":"new"}

why it is not serializing ..?why it is giving empty...?help appreciated...
Closed Jul 2, 2013 at 11:58 PM by JamesNK
DynamicValue appears to be in Microsoft.Activities.dll and it is no longer publicly available. You'll likely have to write a JsonConverter to get it to serialize correctly.

comments