Zaid-Ajaj / Fable.Remoting

Type-safe communication layer (RPC-style) for F# featuring Fable and .NET Apps
https://zaid-ajaj.github.io/Fable.Remoting/
MIT License
273 stars 55 forks source link

float32 does not work #95

Closed 0x53A closed 5 years ago

0x53A commented 6 years ago

I wanted to transmit a float32 array over Fable.Remoting, but always got

Error: "Cannot convert ["JNumber",0] to ["Any",null]"

grafik

Workaround

After changing all of them to float (64 bit), it works

Root cause

I would guess this is maybe because Fable.SimpleJson doesn't handle System.Single?

grafik

Zaid-Ajaj commented 6 years ago

Thanks for the report, this should be an easy fix indeed. The root cause is almost always in SimpleJson as the library handles all JSON serialization business, I will try to fix it later today

Zaid-Ajaj commented 5 years ago

Fixed in SimpleJson/PR-18, will patch remoting client as soon the nuget is ready

Zaid-Ajaj commented 5 years ago

Fix and published in version 4.5.3 of the remoting client, can you please update and check whether the issue persists?

0x53A commented 5 years ago

Thank you! I reverted all my workarounds, updated the packages and now everything so far works!

byte arrays: ✔️ uint32: ✔️ float32: ✔️