SAFE-Stack / SAFE-template

dotnet CLI template for SAFE project
MIT License
282 stars 87 forks source link

Client-server communication doesn't work with type "Map<'a option, 'b>" when the key is "None" #505

Closed reneederer closed 1 year ago

reneederer commented 2 years ago

Hi,

you can replicate the error by cloning https://github.com/reneederer/maptest

Basically, I created a new SAFE project from the template and changed ITodosApi in Shared.fs to

    { getTodos: unit -> Async<Map<int option, Todo list>>
      addTodo: Todo -> Async<Todo> }

When the call to getTodos returns a Map with a "None" key, the client throws an error: Input string was not in a correct format.

kerams commented 2 years ago

This could potentially be a Fable.SimpleJson problem.

theprash commented 1 year ago

@reneederer This is an issue with https://github.com/Zaid-Ajaj/Fable.Remoting so please could you raise an issue there? Thank you.