Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for IReadOnlyDictionary<K,V>? #44

Open
smoothdeveloper opened this issue Nov 22, 2020 · 0 comments
Open

Support for IReadOnlyDictionary<K,V>? #44

smoothdeveloper opened this issue Nov 22, 2020 · 0 comments

Comments

@smoothdeveloper
Copy link

I wonder if it could be supported by the libray, it seems to fail with what I hoped to serialize:

#r "nuget: FSharp.Json"
readOnlyDict [1,2;3,4] |> FSharp.Json.Json.serialize
FSharp.Json.JsonSerializationError: Failed to serialize, must be one of following types: record, map, array, list, tuple, union. Type is: Dictionary`2.
   at FSharp.Json.Core.failSerialization[a](String message)
   at FSharp.Json.Core.serialize(JsonConfig config, Type t, Object value)
   at FSharp.Json.Json.serializeEx(JsonConfig config, Object theobj)
   at FSharp.Json.Json.serialize(Object theobj)
   at <StartupCode$FSI_0012>.$FSI_0012.main@()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant