We need to write a custom JsonConverter
for DateTime
and DateTime?
in order to respect the date format specified with the DisplayFormat
attribute.
[if anybody knows of an existing converter doing exactly this -> we would like to know of it :-)]
We derived our converter from JsonConverter
, however, there seems to be no way to access any attributes as we do not have access to the property being converted - only to its type and value.
Is there any other way we overlooked? How to access attributes from within a JsonConverter?