Please note that there is a difference between using Realm.copyToRealmOrupdate(RealmObject) and Realm.createOrUpdateFromJson(Json)
The answer I gave is true for copyToRealmOrUpdate() for example. you cannot distinguish the following in Java:
boolean bool1; boolean bool2 = false;
For JSON, this is different where you can determine if a property is missing at all. However, the current implementation does not work that way. We are currently trying to merge a Pull request that really has the behavior you are looking for. You can follow the progress here: https://github.com/realm/realm-java/pull/1022
source share