Converting To New Firebase - Enums
Today I tried to move to the new (Google)Firebase. Not only is the API different, but also the way data is stored in the database is different. For instance, numbers (Double) saved
Solution 1:
My feeling with Firebase 9.0.0 is that it adheres much more to the documentation.
Json supported formats are ( String, Long, Double, Boolean, Map, List) - from firebase docs.
The previous SDK - using Jackson - was more flexible. Eg. A String could easily be parsed to a Long in the model, as long as it's a numeric. Lists could be parsed into Arrays [], and so on... Not anymore.
This may be good or not. In one hand you lose flexibility but in the other it makes you more conscious on the defined model and what you actually deploy to the network.
With respect to enums this post may help.
Post a Comment for "Converting To New Firebase - Enums"