Question

Cognizant Technology Solutions
CA
Last activity: 21 Oct 2016 4:47 EDT
Service Rest - Mapping approach - Clipboard Vs JSON
Hi ,
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
|
JSON |
Clipboard |
expected behavior |
Retains pxObjClass |
No |
Yes |
Yes |
Retains Datatype |
Yes |
No |
Yes |
Retains Null Values |
Yes |
No |
Yes |
Hi ,
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
|
JSON |
Clipboard |
expected behavior |
Retains pxObjClass |
No |
Yes |
Yes |
Retains Datatype |
Yes |
No |
Yes |
Retains Null Values |
Yes |
No |
Yes |
Behavior |
Explanation |
Retains pxObjClass |
Map to JSON option does not retain the pxObjClass property from Clipboard to JSON Conversion |
Retains Datatype |
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 |
Retain NullValues |
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***