You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
at first, I would have say that boxing the type would prevent us to access the "real" type info. But the error seems to know that it's the type Program+MyRecord that need to be accessed.
Line 416 of Encode.fs it call autoEncoder with fi.PropertyType which returns System.Object, which ultimately create this encoder: boxEncoder(fun (v: obj) -> JValue(v) :> JsonValue)
I think this happen because the type of the Config field when we box it is object.
This code throws
System.ArgumentException: 'Could not determine JSON object type for type Program+MyRecord.'
If we remove the
box
, the serialization works but sadly in my case I cannot avoid it.The text was updated successfully, but these errors were encountered: