cklester Well-Known Member Licensed User Oct 9, 2020 #1 I'm getting a crash when loading back a Map that has an "Array as String" as the value. See attached project. What am I doing wrong? Attachments StringArrayInMapCrash.zip 8.9 KB · Views: 202
I'm getting a crash when loading back a Map that has an "Array as String" as the value. See attached project. What am I doing wrong?
OliverA Expert Licensed User Longtime User Oct 9, 2020 #2 When you use File.WriteMap, everything is converted to string. On reading back the file via File.ReadMap, all you have is String keys and String values. The original value types are not restored. Upvote 0
When you use File.WriteMap, everything is converted to string. On reading back the file via File.ReadMap, all you have is String keys and String values. The original value types are not restored.
cklester Well-Known Member Licensed User Oct 9, 2020 #3 Ah. So, if I want to retain the original structure, can I use that Serializator thing? Or is there a better way to store a string array in a map? Upvote 0
Ah. So, if I want to retain the original structure, can I use that Serializator thing? Or is there a better way to store a string array in a map?
cklester Well-Known Member Licensed User Oct 10, 2020 #4 Even if I log() the value I get from the map read from file, I get this: [Ljava.lang.String;@322d3fde How do I view that as the string it's supposed to be? Upvote 0
Even if I log() the value I get from the map read from file, I get this: [Ljava.lang.String;@322d3fde How do I view that as the string it's supposed to be?
B Brian Dean Well-Known Member Licensed User Longtime User Oct 10, 2020 #5 See this recent post in the Android forum ... https://www.b4x.com/android/forum/t...er-write-and-read-the-map.123061/#post-768586 Upvote 0
See this recent post in the Android forum ... https://www.b4x.com/android/forum/t...er-write-and-read-the-map.123061/#post-768586