# Logstash JSON File input

**URL:** <https://discuss.elastic.co/t/logstash-json-file-input/308108>\
**Category:** Logstash\
**Created:** [June 24, 2022, 11:39am UTC](https://discuss.elastic.co/t/logstash-json-file-input/308108 "2022-06-24T11:39:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![priyankamondalhcl](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@priyankamondalhcl](https://discuss.elastic.co/u/priyankamondalhcl)\
**Post date:** [June 24, 2022, 11:39am UTC](https://discuss.elastic.co/t/logstash-json-file-input/308108/1 "2022-06-24T11:39:47Z")

</div>

Hi Team,

Please help me to set logstash config from nested json input file.

My json file look like below:

[  
{  
"billing\_account\_id": "loma",  
"InvoiceMonth": "123456",  
"credits": [  
{  
"name": "abc",  
"amount": ,0.005  
"full\_name": null,  
"id": "abc",  
"type": "xyz"  
}  
],  
"resource\_name": null,  
"resource\_global\_name": null  
},  
{  
"billing\_account\_id": "jill",  
"cost": 0.0,  
"credits": ,  
"resource\_name": null,  
"resource\_global\_name": null  
},  
{  
"billing\_account\_id": "jack",  
"cost": 0.0,  
"service\_id": "jack123",  
"service\_description": "description",  
"sku\_id": "143342",  
"credits": ,  
"resource\_name": null,  
"resource\_global\_name": null  
}  
]

and my config looks like below:

input {  
file {  
path =\> "/etc/logstash/conf.d/test.json"  
start\_position =\> "beginning"  
sincedb\_path =\> "/dev/null"  
codec =\> multiline { pattern =\> "^Spalanzani" negate =\> true what =\> previous auto\_flush\_interval =\> 1 multiline\_tag =\> "" max\_lines =\> 1000025}  
}  
}

filter {  
json{ source =\> "message" }  
}

output { stdout { codec =\> rubydebug } }

while running I am getting error something like this : :exception=\>#\<LogStash::Json::ParserError: Unexpected end-of-input: expected close marker for Array (start marker at [Source: (byte)

---

<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:** [July 22, 2022, 11:40am UTC](https://discuss.elastic.co/t/logstash-json-file-input/308108/2 "2022-07-22T11:40:38Z")

</div>

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