B4J Question Crash When Value from Map.Get() is String Array After Loaded from Map File

cklester

Well-Known Member
Licensed User
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: 180

OliverA

Expert
Licensed User
Longtime User
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

cklester

Well-Known Member
Licensed User
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

cklester

Well-Known Member
Licensed User
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
Top