Open kyryloboiev opened 1 year ago
@Tarmil do you agree that this has to work?
I've tested the code above a bit, and it seems that it works if you replace CanConvert
with:
override __.CanConvert(t) = t = typeof<string>
at least since version 1.0.7
(which, judging from date in nuget was actual when this issue was raised)
Also peculiar fact: if you add [<JsonFSharpConverter>]
attribute to Robot
record then it still works under version 1.0.7
, but throws
Unhandled exception. System.Text.Json.JsonException: The JSON value could not be converted to System.String. Path: $ | LineNumber: 0 | BytePositionInLine: 1.
under 1.1.23
and later versions, which may be a bug.
@Tarmil can this be fixed? I tried to figure out myself how to do that but had no luck. Or maybe you at least suggest what to do?
I have a Robot type with a string property Model I get an json that has a Model type with Name and Version for this I create a ModelConverter and expect to process and return string