NetTalk Central

Author Topic: NetWebServiceMethod - RemovePrefix  (Read 4496 times)

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
NetWebServiceMethod - RemovePrefix
« on: March 26, 2018, 12:34:54 AM »
Hi,

I have a couple of NetWebServiceMethod procedures where the table prefixes are not removed in the resultant JSON, but the settings are correct. This is a sample of the code that the template generates in the BuildResultFields routine:

        ...
        jsonResults.RemovePrefix = true
        jsonResults.TagCase = jf:CaseAsIs
        jsonResults.CascadeDown()
        jsonResults.ExportBlobsWithView = true
        ...


I thought that the labels in the dictionary would be a possible cause that the prefixes are in the response, but (see attached file) there is nothing strange about the table definition. Below is an example of the response:

{
    "dbStaff_response": {
        "queue": [
            {
                "STFF:USERID": "AB",
                "STFF:INITIALS": "AB",
                "STFF:SURNAME": "Botha",
                "STFF:NAME": "Andrea",
                "STFF:TELNOWORK": "12650",
                "STFF:TELNOHOME": "(010)430 7873",
                "STFF:TELNOCELL": "089 577-2539",
                "STFF:ADDTELCONTACT": "(010) 312-6458",
                "STFF:PARENTUSERID": "",
                "STFF:EMAIL": "m@m.com",
                "STFF:ALTERNATIVEID": ""
            }
        ]
    }
}


Any ideas on how to fix it, without overriding each column's label?
Thys

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NetWebServiceMethod - RemovePrefix
« Reply #1 on: April 09, 2018, 11:06:36 PM »
my guess is you're using a not-quite-recent build of jFiles. From the jFiles release notes;

>>  1.60 : Change: MAxPrefixLengthInJSON default value set to 5, up from 4 (includes colon).

Also you may not be up to date with NetTalk, from the release notes there

>> 10.16 : Change: WebServiceMethod: uses file prefix length to set MaxPrefixLengthInJson.

cheers
Bruce

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
Re: NetWebServiceMethod - RemovePrefix
« Reply #2 on: April 10, 2018, 12:04:21 AM »
I'm not up to date with jFiles - will get that done. With NT I'm on the latest.

Thanks