I create a Xojo.core.dictionary from HTTP request headers. When I pass the dictionary to another function, I get a Xojo.core.invalidargumentexception, reason: root: String value does not have a specified encoding.
I have tried setting the encoding on each header value as I add it to the dictionary.
for i = 0 to vNames.Ubound
d.Value(Uppercase(vNames(i))) = DefineEncoding(Request.GetRequestHeader(vNames(i), Encodings.UTF8))
I have tried defining the encoding when I generate JSON.
I have also tried…
Dim t As Auto ** also tried As Text
t = xojo.Data.GenerateJSON(d)
Dim j As new JSONItem(DefineEncoding(t, Encodings.UTF8))
What am I not understanding?