NJsonSchema
NJsonSchema copied to clipboard
Possible issue with TypeConverter attribute
Hi,
I have a C# class with this attribute:
[TypeConverter(typeof(ExpandableObjectConverter))]
Without the attribute, the JsonSchemaGenerator works fine and generates the json string with all properties, but, when I put this attribute, the result it is:
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "ClassName", "type": "string" }
Is this an issue or missing something in my code?
Thanks
I have the same problem. I'm using TypeConverters all over the place for displaying objects in the Winforms (yikes) PropertyGrid.
I have a similar problem with NewtonsoftJson and I hate it. TypeConverters are a thing of System.ComponentModel and in my opinion should not affect json serialization, at least not by default. But if it does, for whatever reason, I'd like a way to opt out.