Hi Aditya,
Try the following payload factory (I assume you are receiving the above
mentioned input JSON as request)
<payloadFactory media-type="json">
<format>
{
"firstName": "$1",
"lastName": "$2",
"email": "$3"
}
</format>
<args>
<arg evaluator="json" expression="$.FirstName.Value"/>
<arg evaluator="json" expression="$.LastName.Value"/>
<arg evaluator="json" expression="$.Email.Value"/>
</args>
</payloadFactory>
Regards
Senduran
On Wed, Jan 10, 2018 at 12:48 PM, aditya shivankar <
[email protected]> wrote:
> Respected Sir,
>
> Please find attached proj zip file and Rest api files.
>
> Input :
>
> {
> "FirstName": {
> "Type": "System.String",
> "Value": "John",
> "Original": "John"
> },
> "LastName": {
> "Type": "System.String",
> "Value": "",
> "Original": ""
> },
> "Email": {
> "Type": "System.String"
> }
> }
>
> Output of PayloadFactory :
> {
> "firstName": John,
> "lastName": {"Value":null},
> "email":
> }
>
> Expected Output :
> {
> "firstName": "John",
> "lastName": "",
> "email": "",
>
> }
>
>
>
> With Regards,
> Aditya
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
--
*Senduran *
Senior Software Engineer,
WSO2, Inc.; http://wso2.com/ <http://wso2.com/>
Mobile: +94 77 952 6548
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev