After posting JSON with jQuery, convert the string back into a JSON

So I have some code that posts this JSON:

post = {
    period: "1",
    data: {1: "Here"}
}

And it is posted with this code:

$.ajax({
    url: 'http://127.0.0.1:5000/',
    data: post,
    type: 'POST'
})

When I execute this code, my server receives this string: "period=1&data%5B3%5D=Here"

Is there a way to convert this string back into a JSON?

I have tried JSON.parse() but that obviously did not work.

Answer

It was never JSON, you can send it as JSON by using JSON.stringify and then use JSON.parse to get it back as an object on the server.

$.ajax({
    url: 'http://127.0.0.1:5000/',
    data: JSON.stringify(post),
    contentType: 'application/json',
    type: 'POST'
})