SAFE-template icon indicating copy to clipboard operation
SAFE-template copied to clipboard

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

Open reneederer opened this issue 3 years ago • 1 comments

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.

reneederer avatar Mar 03 '22 08:03 reneederer

This could potentially be a Fable.SimpleJson problem.

kerams avatar Mar 03 '22 08:03 kerams

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

theprash avatar Sep 01 '22 16:09 theprash