I'm trying to load data into Meilisearch via CURL but keep getting the error:
Invalid JSON: expected value at line 1 column 1
I have run the JSON through a validator and the data pass so I decided to download the sample data from Meilisearch to double-check my own sanity (https://raw.githubusercontent.com/meilisearch/MeiliSearch/master/datasets/movies/movies.json).
The test movie.json also passes validation but when I try and load it into Meilisearch I get the same error Invalid JSON: expected value at line 1 column 1
.
Is it possible my CURL request is the problem?
curl -X POST 'http://127.0.0.1:7700/indexes/products/documents' --data products.json
...
curl -X POST 'http://127.0.0.1:7700/indexes/movies/documents' --data movies.json
Steps to reproduce on Ubuntu 18.04 are as follows:
- Download and launch with Docker
docker run -it --rm \
-p 7700:7700 \
-v $(pwd)/data.ms:/data.ms \
getmeili/meilisearch
- Download the sample data
curl -X GET 'https://raw.githubusercontent.com/meilisearch/MeiliSearch/master/datasets/movies/movies.json'
- Try and index the sample data
curl -X POST 'http://127.0.0.1:7700/indexes/movies/documents' --data movies.json