You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we write some data of type A and read it as type B with the same key, unexpected value will be returned. For example:
MMKVkv = MMKV.mmkvWithID(mmapID, MMKV.SINGLE_PROCESS_MODE, cryptKey);
kv.encode("bool", true);
intval = kv.decodeInt("bool", 100);
System.out.println("decode int with key bool: " + val);
The terminal will print decode int with key bool: 1. That is kind of misleading since we never store any int value with key "bool", meanwhile there was no error or exception thrown when we are doing this implicit casting.
Is this an intentional design?
The text was updated successfully, but these errors were encountered:
If we write some data of type
A
and read it as typeB
with the same key, unexpected value will be returned. For example:The terminal will print
decode int with key bool: 1
. That is kind of misleading since we never store anyint
value with key"bool"
, meanwhile there was no error or exception thrown when we are doing this implicit casting.Is this an intentional design?
The text was updated successfully, but these errors were encountered: