2012-06-07T00:29:47.000
日付があり、逆シリアル化する必要があるjsonがあります。しかし、
DataContractJsonSerializer serializer = new DataContractJsonSerializer(type);
return (object)serializer.ReadObject(Util.GetMemoryStreamFromString(json));
以下の例外が発生します
There was an error deserializing the object of type System.Collections.Generic.List`1
[[MyNameSpace.MyClass, MyNameSpace, Version=1.0.4541.23433, Culture=neutral, PublicKeyToken=null]].
DateTime content '2012-06-07T00:29:47.000' does not start with '\/Date(' and end with ')\/' as required for JSON
Windows Mobile 7では機能しますが、同じコードはWindows8では機能しません
。の代わりに
日付形式が必要です。\/Date(1337020200000+0530)\/
2012-06-07T00:29:47.000
はいの場合、カスタムシリアル化が必要ですか?また、Androidで同じJSONが使用されているため、使用する必要があり、JSONの形式を変更できません
JSON.NET
。.netは初めてです。ありがとう。DataContractJsonSerializer