ShipBook / ShipBookSDK-Android

A logging system for Android
https://shipbook.io
MIT License
28 stars 7 forks source link

Avoid casting for the default maxTime value #7

Closed albertovecina closed 2 years ago

albertovecina commented 2 years ago

As the sdk is parsing this configuration as String, this avoids the casting (made by the JSON library internally) when it is parsing the default values. This is related to https://github.com/ShipBook/ShipBookSDK-Android/pull/6

elishas commented 2 years ago

This is sure not a good solution. maxTime is a number and therefor it should be a number also in JSON. The issue is that we are keeping the information as an MutableMap<String, String>. Might be that we should have kept in another type that can have String and Double in it.
But in reality there is no problem with the code because we convert it to String due to the map and then to the type that it is supposed to be