Tips on translating/interpreting Settings data as Dictionary/Array, rather than as String?

Hi,

The app I'm building downloads data in JSON format from a webpage. Lets take this small JSON snippet as an example.

{
"fileVersion": "2.0",
"Event": { "Name": "MyRace" }
}

The app will save it to settings so it doesn't need to be loaded each time the app gets executed, so it does this after makeWebRequest, and can save and access the data fine later on, because it retains its 'dictionary' type.

--output--
data = {Event=>{Name=>MyRace}, fileVersion=>2.0}
data is instanceof dictionary.

Later in the program I can access the data members fine, as an example by using myEventName = loadedData["Event"]["Name"].toString<[]>;

However, I want the user to be able to upload their own JSON/textual event data, by copying it into a setting which the app accesses like other settings, rather than getting it from the web. You know, many people still don't own their own webpage where they can post their own event data, so being able to upload one's individual event data into the settings would really help.

The problem I'm having, is that the app always interprets this data (loaded via the settings) as Lang.String type data, not Lang.Dictionary data, even if a System.println() seems to indicate the data is absolutely the same. Consequently it gives me errors when I try to access the data members using the above access method.

In order to get the data into the settings, I have so far tried copying it without the normal JSON components including " quotation marks, and : colons, but just the bare minimums. So for instance, I would copy the below line into the settings as is, without any changes:

{Event=>{Name=>MyRace}, fileVersion=>2.0}

But, when I load the data from settings, I get the following output, and my normal methods for using the data have problems

--output--
data = {Event=>{Name=>MyRace}, fileVersion=>2.0}
data is NOT instanceof dictionary.
data is string.

To make matters worse, my data consists of a few sub-levels of arrays and dictionaries, which occasionally change format depending upon the event, so being able to interpret it by coding a textual-interpreter would be very difficult. I am trying to get my app to work with this external event data file format - I can't pick how the event data file is formatted.

Maybe if I could reprogram all my processing functions to operate with String data. However, it's a daunting task that I wish there was a simpler solution to.. Does anyone have any recommendations? Thanks in advance!