How to convert content-type: application/x-www-form-urlencoded to json

Hello everyone,
I am prettty new with AWS cloud and I am struggling on a silly problem.
I have a simple HTML form that send data as “content-type: application/x-www-form-urlencoded” to API GW. When I tried to read the data from Lambda event, I got this in request body: email=test%40test.com and I am not able to convert in JSON.

Is there a way to convert it to JSON through API GW?
I tried using mapping templates, but I am bit lost.
This is the important part of my serverless.yml:

Blockquote
functions:
subscribe:
handler: bin/register
memorySize: 128
events:
- httpApi:
path: /register
method: post
integration: lambda
request:
passThrough: NEVER
template:
application/x-www-form-urlencoded: $input.json(’$’)

Where I am doing wrong?

No. If you’re using application/x-www-form-urlencoded encoded content then it’s URL encoded string. You need to URL decode the body to access the data. If you’re using nodejs then you might be able to use URLSearchParams.

I am using Go.
Thank you.