- Tom Holland
- .NET DataStore
- Tuesday, 22 September 2020 02:43 PM UTC
We are having trouble using the DwNet.Data and SnapObjects.Data and having trouble with Mapping.Method, when using the PowerBuilder RestClient.Submit. The Mapping.Method is set to 0 and this is causing problems with the processing of the json. Looks like either DwNet.Data or SnapObject.Data depends on the mapping-method when it deserializes the input json into a datastore/model.
Changing from "mapping-method":0 to "mapping-method":2, then the validation passes and the .NET datastore endpoint works. Otherwise, the validation fails since the json is incorrectly read and values are mapped to the wrong field.
Is there a way to change the mapping-method on the PowerBuilder side using RestClient.Submit? Or is there a standard way to handle this on the .NET side?
Here is the first part of the json with the mapping-method:
{"identity":"removed","version":1,"platform":"PowerBuilder","mapping-method":0,"dataobject":
Here are the options for the mapping-method. We would like to map to the key of the JSON item:
0 -- Use the index of JSON item to map with the DataWindow column.
1 -- Use the index of meta-columns to map with the DataWindow column.
2 -- Use the key of JSON item to map with the DataWindow column.
Thank you for any help you can provide.
Tom
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.