1

The following json is not correctly deserialized by Newtonsoft JSON.NET into byte[]:

{
ID:123,
Name:'test',
RowVersion: {
    $current: null,
    $current_uid: null,
    $parent_uid: 1,
    $type: "System.Byte[], mscorlib",
    $uid: 2,
    $value: "AAAAAAAAEnM="
    }
}

The deserialization works fine for all the members of the object except RowVersion, which is mapped to byte[] in C#, deserializes as null.

I'm using the following custom ValueProviderFactory:

JSONSerializer.Deserialize<List<ExpandoObject>>(JSONReader);

Can somebody help me understand why RowVersion is deserialized as null?

Andrew Whitaker
  • 124,656
  • 32
  • 289
  • 307
xaviergxf
  • 33
  • 5
  • Did you try entering the keys quoted? "$value" and so... – aalku Apr 30 '15 at 15:13
  • Aside some extra properties that i added to each json object this is how Json.net delivers its data. The problem is somewhere between the ValueProviderFactory and the convesion from ExpandoObject to its type. – xaviergxf Apr 30 '15 at 15:39

0 Answers0