1 Resposta
- Mais recentes
- Mais votos
- Mais comentários
0
Hello,
You may just try this $util.urlDecode($input.params('myJson')) and provide the query string value GET /api/endpoint?myJson=%7B%22x%22%3A123%7D and it should work as you expect. you need not to worry about parsing as you are providing json string value of json with encode, hence by decoding you will get json string back. if you like to use stringify version containing "/" then you have to replace "/" with nothing to get json string. hope it helps. thanks
Code snippet:
"myParsedJson" : $util.urlDecode($input.params('myJson'))
output:
myParsedJson : {"x":123}
respondido há 2 anos