Razenpok / BreakInfinity.cs

Double replacement for numbers that go over 1e308
MIT License
212 stars 33 forks source link

Can't Deserialize with Newtonsoft.json in Unity v2022.3.27f1 (newtonsoft version 3.0.2) #22

Closed Lorenzo0402 closed 1 month ago

Lorenzo0402 commented 1 month ago

Serialization works perfectly fine with Newtonsoft.Json.JsonConvert.SerializeObject(data)

De-serialization does not work. BigDouble values are "0". example.json looks like this: { "Money": { "Mantissa": 1.421, "Exponent": 23 } }

Lorenzo0402 commented 1 month ago

Maybe this is a issue with Newtonsoft.json? not sure, im posting it there too

Lorenzo0402 commented 1 month ago

Changed the code from being a private mantissa and exponent to being public, changing the constructors aswell. now it works. closing this thread.