# How to index file have content json with FSCrawler

**URL:** <https://discuss.elastic.co/t/how-to-index-file-have-content-json-with-fscrawler/202607>\
**Category:** Elasticsearch\
**Created:** [October 8, 2019, 2:29am UTC](https://discuss.elastic.co/t/how-to-index-file-have-content-json-with-fscrawler/202607 "2019-10-08T02:29:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vo\_Van\_Huy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vo_van_huy/32/55461_2.png) [@Vo\_Van\_Huy](https://discuss.elastic.co/u/Vo_Van_Huy)\
**Post date:** [October 8, 2019, 2:29am UTC](https://discuss.elastic.co/t/how-to-index-file-have-content-json-with-fscrawler/202607/1 "2019-10-08T02:29:38Z")

</div>

I have file json(/tmp/es/ecep\_elib\_table\_books.json) with content:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/6/26b1420cb104c4c522d7a1910a7a183013cba523.png)  
I config file /\_default/6/\_settings.json  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/8/f860f17025f5327223e1bcdcaae61c385d5b38b5.png)  
I config file \_settings.json into my job  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/7/a766a979c96a782b6c72176afe3c3028263b7538.png)  
When I run bin/fscrawler --config\_dir ./demo\_01 demo\_01 --restart, I get error  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/4/94c7e247ff5839137eac668d16bf4f39acfb0289.png)  
I hope someone can help my fix it ☹  
Thanks.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 8, 2019, 8:16am UTC](https://discuss.elastic.co/t/how-to-index-file-have-content-json-with-fscrawler/202607/2 "2019-10-08T08:16:48Z")

</div>

Welcome!

Please don't post images of text as they are hard to read, may not display correctly for everyone, and are not searchable.

Instead, paste the text and format it with `</>` icon or pairs of triple backticks (```), and check the preview window to make sure it's properly formatted before posting it. This makes it more likely that your question will receive a useful answer.

It would be great if you could update your post to solve this.

Here the main issue is that your JSON file contains actually an array of JSON documents not a single JSON document.  
If you want to use FSCrawler, you need to have one single file per json document.  
A Json document should always start with `{`.

---

<div class="post-metadata">

**Author:** ![Vo\_Van\_Huy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vo_van_huy/32/55461_2.png) [@Vo\_Van\_Huy](https://discuss.elastic.co/u/Vo_Van_Huy)\
**Post date:** [October 8, 2019, 8:19am UTC](https://discuss.elastic.co/t/how-to-index-file-have-content-json-with-fscrawler/202607/3 "2019-10-08T08:19:41Z")

</div>

Sorry, I will learn from experience next time.  
The great thing is that I solved the problem above.  
Thank bro.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 5, 2019, 8:25am UTC](https://discuss.elastic.co/t/how-to-index-file-have-content-json-with-fscrawler/202607/4 "2019-11-05T08:25:24Z")

</div>

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