Supposing to have a JSONItem with a value declared as follow:
person.Value("Name") = "John Doe"
reading it from code, the person.lookup(“Name”,"") method needs to use the correct case-sensitive format because
person.lookup("Name","") -> return John Doe
and
person.lookup("name","") -> return blank
In the language reference there’s a JSONItem boolean property called “JSONItem.CaseSensitive”, but trying to use it in the code I’ve got this error:
Type "JSONItem" has no member named "CaseSensitive"
person.CaseSensitive = False
I need the read a JSONItem in case-insensitive mode and actually I’m using my own method to set all JSONItem childs names to lowercase.
Public Function JSONLowerName(ji as JSONItem) as JSONItem
Dim s as String = ji.ToString
dim names() as String
names = JSONGetNames(ji, names)
dim dq as String = chr(34)
For each name as String in names
s = ReplaceAll(s, dq+name+dq+":", dq+Lowercase(name)+dq+":")
Next
Dim Result as New JSONItem
Try
Result.Load(s)
Catch err as NilObjectException
Return Nil
End Try
Result.Compact = False
Return Result
End Function
After this method, using lookup method with all childs name in lowercase, everything works fine.
If I could use the CaseSensitive JSONItem boolean property I would avoid to use my JSONLowerName function.
So this is my question:
Is JSONItem boolean property called CaseSensitive available? If the answer is yes, well, how can I use it?