Workaround for big numbers in JSONs
- Aug 30, 2022
-
-
Dariusz Rybicki authored
-
Dariusz Rybicki authored
convertJsonNumberToString(in:minNumberLength:)
-
Dariusz Rybicki authored
-
Dariusz Rybicki authored
-
Dariusz Rybicki authored
-
This MR introduces a workaround for an issue where JSON models containing big numbers (eg 930-digits) can't be parsed by swift's JSONDecoder
/JSONEncoder
.
This affects the GroupMember
model, which holds DHKey
models that has value
property with such a big number. The model's value is stored as String
, and it's automatically decoded/encoded to big number in JSON.
convertJsonNumberToString(in:minNumberLength:)