1

Closed

JsonSchemaGenerator fails to serialize circular reference to JSON Schema

description

Hi,
 
when trying to serialize a c# class ("InformationObject") referencing itself, I get the following error message:
"Unresolved circular reference for type 'ConsoleApplication1.InformationObject'. Explicitly define an Id for the type using a JsonObject/JsonArray attribute or automatically generate a type Id using the UndefinedSchemaIdHandling property."
 
Is there any means to resolve this? I know that JSON serialization of objects allows to preserve object references, but this is not of real use here.
 
Cheers,
Chris
Closed May 4, 2012 at 1:07 PM by JamesNK
Are you serious? The error message told you exactly what to do.

comments