Hello folks!
I’m trying to serialize an Event type which has a decimal
property with the value set as 0.00000000714
. Both System.Text.Json
and JSON.Net
works perfectly fine serializing and deserializing it however, when I send the byte[]
data as the event payload, EventStoreDB persist it in the wrong way and while reading the event, it is all set to 0.
I’ve then tried to create the event directly from the portal and here is what I got:
Event:
{
"TotalEarnings": 0.00000000714
}
What is persisted:
{
"TotalEarnings": 7.14E-09
}
So clearly it is not a problem on our client serializing the number but instead, the way `decimals are persisted as the same behavior happens from the portal.
Any way to workaround this while a real fix comes out? That problem happens on both the ES Cloud and the local ES DB.
Any help would be appreciated.
Thanks!