Posted: 2 Oct 2016 18:07 EDT Last activity: 21 Oct 2016 4:47 EDT
Service Rest - Mapping approach - Clipboard Vs JSON
I am current exploring these two mapping options for Request and Response of a REST Service.Below is the my observed behavior after testing with request with proper values and null vlaues for all available data types
Here clipboard mapping done using Param.Request and Param.Response byusing OOTB functions pxConvertStringtoPage and pxConvertPagetoString respectively.Kindly suggest a solutions where we get the expected behavior in both mapping approach.
If you are not able to view the table properly.Please find the same in the attached document
Retains Null Values
Map to JSON option does not retain the pxObjClass property from Clipboard to JSON Conversion
The data type of the property is not retained.Eg the clipboard property is a decimal whose value is 9.76 then after JSON conversion it should be decimalprop:9.76.if the converted JSON has decimalprop:"9.76".Then it means data type is not retained
If the clipboard property(eg:pyTextValue) is holding blank or Null value then converted JSON should be pyTextValue:""
***Updated by Moderator: Vidyaranjan. Removed user added Ask the Expert tag. Apologies for confusion, shouldn't have been an end-user option***