Please pardon me if this is a simple solution but I am new to BrightScript.
I need to convert an roAssociativeArray to a JSON object while preserving the case sensitivity of the original keys. Even when setting SetModeCaseSensitive(), the keys will print out in all lowercase. Is there a trick to getting the keys to preserve their case, or a better way to convert an object to JSON keeping the key case?
EX:
obj = CreateObject("roAssociativeArray")
obj.SetModeCaseSensitive()
obj.PropertyWithCamelCase1 = "String Value"
obj.PropertyWithCamelCase2 = "something else"
obj.PropertyWithCamelCase3 = "another thing"
When I run it through a JSON builder method such as the one found here:
viewtopic.php?p=200771It will be converted to the following string:
"{"propertywithcamelcase1":"String Value","propertywithcamelcase2":"something else","propertywithcamelcase3":"another thing"}"
I need it to look like:
"{"PropertyWithCamelCase1":"String Value","PropertyWithCamelCase2":"something else","PropertyWithCamelCase3":"another thing"}"
Any help is appreciated.