# Ingesting JSON files, format problem?

**URL:** <https://discuss.elastic.co/t/ingesting-json-files-format-problem/36411>\
**Category:** Logstash\
**Created:** [December 4, 2015, 6:35pm UTC](https://discuss.elastic.co/t/ingesting-json-files-format-problem/36411 "2015-12-04T18:35:06Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![CraigFoote](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/craigfoote/32/4571_2.png) [@CraigFoote](https://discuss.elastic.co/u/CraigFoote)\
**Post date:** [December 4, 2015, 6:35pm UTC](https://discuss.elastic.co/t/ingesting-json-files-format-problem/36411/1 "2015-12-04T18:35:06Z")

</div>

I have a series of JSON files, each with one rather large, single-line JSON document. I'm trying to ingest via the file input plugin:

```
input{
	file{
		path => "/path/to/files/*.txt"
		start-position => "beginning"
		sincedb_path => "/dev/null"
		codec => "json"
	}
}
output{
	stdout{ codec => rubydebug }
}

```

I think there's something wrong with my json format because it works when I put a test.txt file in that folder with content:  
`{"test1":"test2"}`

The series of json files I want to ingest are of the format:

`{"messages":[{"text": ["The result was retrieved successfully."], "level": "INFO"}], "results":[{"field1": "value1", "field2": [{"field2a": "value2a", "field2b": "value2b"}], "field3": "value3"}]}`

Is there a problem here? I don't get any errors and the files are found but I see nothing from rubydebug. Could it be the length of the files, they are a couple MB each.

---

_[View the full topic](https://discuss.elastic.co/t/ingesting-json-files-format-problem/36411)._
