Skip to content

Instantly share code, notes, and snippets.

@uranio-235
Created July 29, 2019 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uranio-235/683dd72a2fa7d4b0ea14213332a4de08 to your computer and use it in GitHub Desktop.
Save uranio-235/683dd72a2fa7d4b0ea14213332a4de08 to your computer and use it in GitHub Desktop.
serialization problem
protected static string GetEntityInChargeJSONRepresentation(EntityInCharge entityInCharge)
{
if (entityInCharge == null) return "null";
return JsonConvert.SerializeObject(
entityInCharge,
Formatting.None,
new JsonSerializerSettings() { ReferenceLoopHandling = ReferenceLoopHandling.Ignore });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment