3

Started working with AWS API Gateway and needed to process some data coming in from an it via AWS Lambda.

After much tinkering with the API Gateway, realised that no matter what I do, the response body of the API Gateway will be a string literal and not a JSON.

Why does this have to be this way? Half a day lost banging the head against the wall.

Comments
  • 0
    Can you JSON.parse() it?
  • 0
    @h4xx3r for some reason with python I had to json.dumps and then json.loads(dump) and json.loads(loadeddump).

    As the first load gave me what looked like a JSON but was actually a string.

    Super confusing at first if you ask me.

    The first loads - loads the string into JSON format but it just parses all \n etc,

    The second loads - parses the first loads into an actual json
Add Comment