Could not find JSON Generator for type TColor

Hello!

I try to add a swagger UI feature to my XData project, but I encounter a problem with the TColor.

I get this error:

Project raised exception class EJsonGeneratorNotFound with message 'Could not find JSON Generator for type "TColor"'.

The problem is located in the object that has a property of TColor type. Because it's a legacy system upgrade, I would prefer to not change the property type. I added [XDataExcludeProperty], but is not woking.

Also - is possible to make a class not visible to XData? Similar to [XDataExcludeProperty] ?

I would need some help with this issue.

Kind regards.

Try to add [XDataExcludeProperty] to the field, not the property.
You can use [SwaggerExclude] attribute to exclude a class from Swagger.

1 Like

It worked, thank you!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.