I (the Java server developer) and two of my colleagues (iOS and Android developers) have a problem (actually a dispute).
The opinion of mobile developers: I need to replace in the JSON that they retrieve from my server, all empty fields (this field may be a field for my custom object) for empty quotes (note that Java is a language with static types). The reason for this: they cannot find a solution that allows me to deserialize my JSON (object mapping) if it has zero values.
My opinion: java serializers cannot be manipulated at the value level, only at the type level. Therefore, I can write serializer only for some class. And, I don’t know why, but the empty quotes instead of zero seems to me a very bad practice, which can create a lot of problems in the future.
source
share