Can not upload redirects.json file to my Ghost (Pro) blog

I want to implement some redirections for my new blog, but every time I want to upload modified redirects.json I got an error «Could not parse JSON: Unexpected string in JSON at position xxx».

It heppend even with example code from the official tutorial.

For editing I use Sublime Text

Here is my redirects.json — https://d.pr/f/1XreRI

@b166ar the redirects.json file that you’ve uploaded to droplr appears to be empty or the upload has failed? Either way the download from droplr is not working so I’m unable to check the file

Sorry, my fault. Here is my redirects.json:

[ {
"from": "/best-mac-soft-2018/",
"to": "/best-mac-soft/"
"permanent": true
}

{
"from": "/best-mac-soft-2015/",
"to": "/best-mac-soft/"
"permanent": true
}

{
"from": "/best-mac-soft-2014/",
"to": "/best-mac-soft/"
"permanent": true
}

{
"from": "/best-mac-soft-2013/",
"to": "/best-mac-soft/"
"permanent": true
}]

You’re missing commas between closing curly brackets (}) and opening brackets ({).

You can check that your redirects file is valid by using a JSON linter like https://jsonlint.com/

Thank you @vikaspotluri123, this validator helped me.

@Kevin, there is a mistake in «Redirect an old URL to a new one» section of official guide.

@b166ar thanks, I’ve updated the doc!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.