NetTalk Central

Author Topic: NetWebserviceMetrhod update problem with Json  (Read 3864 times)

jari@softmade.fi

  • Full Member
  • ***
  • Posts: 134
    • View Profile
    • Email
NetWebserviceMetrhod update problem with Json
« on: August 28, 2017, 04:30:11 AM »
Hello

If I uncheck "Include field prefixes" then  for example  " json.GetPropertyValue('Customer_Action',1) "  command does not work properly.
Therefore NetWebserviceMetrhod always tries to add a record even if the value of the "Customer_Action" is update.
This is because Customer_Action  is filled in code:
  If json.GetPropertyValue('Customer_Action',1) <> '' ! if the Action is not passed, then fall back on the REST http method.
      Customer_Action = json.GetPropertyValue('Customer_Action',1)
    ElsIf json.GetPropertyValue('action',1) <> '' ! if the Action is not passed, then fall back on the REST http method.
      Customer_Action = json.GetPropertyValue('action',1)
    End


I also noticed that almoust all fields with a "_" character cause problems when  "Include field prefixes"  is not true.
Only arrays works fine

Regards

Jari

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NetWebserviceMetrhod update problem with Json
« Reply #1 on: September 01, 2017, 08:38:05 AM »
Hi Jari,

I've solved this problem (mostly) in xFiles (2.93) and jFiles (1.51).
Grab both of those and the problem will (mostly) go away.

(mostly) - it not expects the prefix (by default) to be 3 or fewer chars.
I'll be updating NetTalk to set this explicitly to 0 for json/xml which is know to not have a prefix.

Cheers
Bruce