Hari Babu

Hari Babu

  • NA
  • 83
  • 0

Is it correct to pass json as string

Sep 10 2018 1:16 AM
I have doubt is it correct/acceptable technique to pass json as string parameter to the API? Is there any implication while passing json as string variable to the API method?
 
i mean normally json will be like this {"blkHouseNo":"11","streetName":"Beach ROAD","postalCode":"123456","storeyNo":"22","unitNo":"2",} but I want to pass as {"PayLoad":"{\"blkHouseNo\":\"183\",\"streetName\":\"Beach ROAD\",\"postalCode\":\"123456\",\"storeyNo\":\"22\",\"unitNo\":\"2\"}"} is it right way ?
 
Currently Any API's following this approach? just asking for prof for the concept to convey to the higher management
 

Answers (5)