NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: AtoB on November 12, 2015, 04:12:45 AM
-
Hi,
I think the field case settings for (at least) the webservice documentation is ignored. I'm using Queues as return type and have external names on the fields and set the "Fieldname Case" to "AsIs", but the documentation for the JSON output shows up as uppercase. (XML output shows mixed case, so that's fine). Using Nettalk 8.65 and jFiles 1.13
first a snippet for the generated XML (correct):
<category>
<id>value</id>
<label>value</label>
</category>
and this is for the JSON:
"category" : [
{
"ID" : value,
"LABEL" : "value"
}
]
Don't know what the actual output is like (need to test this ...)
-
Hmmm, casing seems to revert to the default (uppercase) on several places (with JSON):
- data : caseAsIs is ignored
- when there are errors in p_web.ServiceErrorQueue these are returned in uppercase (while the help, is "hardcoded" to mixed case, see "GenereateHelp Routine"
I've added the following to the BuildResultFields Routine
! Start of "Start of BuildResultFields Routine"
! [Priority 5000]
json.TagCase = jF:CaseAsIs
jsonResults.TagCase = jF:CaseAsIs
That seems to "fix" things.
-
Because each parameter, and return value, can have a different tag case setting, I've needed to make a tweak to jFiles to best fix this issue.
So grab build 1.14 of jFiles.
update: This might affect parsing of incoming Json, so hang on a bit and I'll keep you posted.
cheers
Bruce
-
I haven't gotten to that bit yet, so for the moment I'm fine <g>
(but keeping an eye on it)
Thanks so far
-
Build 1.15 of jFiles adds a new method, SetTagCase.
This update will be required by NT8.66 and NT9 (which call this new method).