I am using the excellent Json.Net library to serialize my entities generated by entity framework. I use the following code to do so :
using (MyVoucherEntities context = new MyVoucherEntities())
{
List<MyObject> list = context.MyObjects.ToList();
string json = JsonConvert.SerializeObject(list);
}
Everything goes well I mean, the objects are correctly serialized except one think : it adds escape characters "" that makes me having nightmare when deserializing on the client side.
[
{
"$id": "1",
"CreationDate": "\/Date(1293186324257+0000)\/",
"ImageUrl": "http://www.google.com",
"Title": "Here is a title"
} ]
Does anybody know why and how I can get rid of these escape characters slash "" ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…