mono-core-2.6.4-2.13.x86_64 Json.NET version 3.5 8JSON.NET Désérialisation "gèlera" (Mono)
j'appelle désérialiseur et cela fonctionne - je peux voir les objets créés (désérialisé) mais le désérialiseur ne sort jamais/retourne.
List<ListEntry> listed_entries = JsonConvert.DeserializeObject<List<ListEntry>>(payload);
Console.WriteLine("Deserialization complete");
Les objets ListEntry sont créés, puis le programme se bloque. "Désérialisation terminée" n'apparaît jamais.
La charge utile JSON est 1,938K de:
[{"entityName": "Contact", "version": 27, "displayName": "", "objectId": 11446184}, {"entityName": "Contact", "version": 33, "displayName": "", "objectId": 10148760}, {"entityName": "Contact", "version": 35, "displayName": "", "objectId": 12695703}, {"entityName": "Contact", "version": 33, "displayName": "", "objectId": 7575210},
... ]
sans retour à la ligne de fuite. Aucun complexe il décode à un objet de:
public class ListEntry
{
public ListEntry()
{
Console.WriteLine("Created ListEntry");
}
[JsonPropertyAttribute("entityName")]
public string EntityName { get; set; }
[JsonPropertyAttribute("objectId")]
public int Objectid { get; set; }
[JsonPropertyAttribute("version")]
public int Version { set; get; }
[JsonPropertyAttribute("displayname")]
public string DisplayName { set; get; }
}
Pouvez-vous poster votre JSON? – Oded