For me, the problem was that the JSON file that I was trying to import had a comma where there wasn’t suppose to be. Specifically it was on the last line of the location array. Here’s an example, notice here that there is a comma at the end of the “value” line:
"location": [
[
{
"param": "post_template",
"operator": "==",
"value": "components\/logo-heading-cta.php",
}
]
],
When I removed that comma, like this:
"location": [
[
{
"param": "post_template",
"operator": "==",
"value": "components\/logo-heading-cta.php"
}
]
],
Then the JSON file imported without any problem. I noticed this because my text editor showed that the comma there was a syntax error. It seems JSON is specific about not having a comma after the last item in an array.
Maybe this will be the solution for anyone else trying to find an answer to this problem.