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
I frequently need to use the interface object expressions feature when referring to types that come from abstracted core libraries as properties in concrete types.
However, it seems that these types are not serializable in FSharp.Json. E.g.:
FSharp.Json.JsonSerializationError: Unknown type: IThing
at FSharp.Json.Core.serializeNonOption@104(JsonConfig config, Type t, JsonField jsonField, Object value)
at FSharp.Json.Core.serializeUnwrapOption@158(JsonConfig config, Type t, JsonField jsonField, Object value)
at [email protected](PropertyInfo prop)
at FSharp.Json.Core.serializeRecord@216(JsonConfig config, Type t, Object therec)
at FSharp.Json.Json.serializeEx(JsonConfig config, Object theobj)
at <StartupCode$FSI_0002>.$FSI_0002.main@() in C:\a.fsx:line 10
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Is there a way to configure this behavior? Either pass in a serializing function or simply mark these fields to be skipped?
The text was updated successfully, but these errors were encountered:
I frequently need to use the interface object expressions feature when referring to types that come from abstracted core libraries as properties in concrete types.
However, it seems that these types are not serializable in
FSharp.Json
. E.g.:yields
Is there a way to configure this behavior? Either pass in a serializing function or simply mark these fields to be skipped?
The text was updated successfully, but these errors were encountered: