title: Get JSON from file
body: <p><em>Logstash 5.2.1</em></p>
  
  <p>I can't read JSON documents from <a href="https://www.elastic.co/guide/en/kibana/3.0/snippets/shakespeare.json" rel="nofollow noreferrer">a local file</a> using Logstash. There are no documents in the stdout. </p>
  
  <p>I run Logstash like this: </p>
  
  <pre><code>./logstash-5.2.1/bin/logstash -f logstash-5.2.1/config/shakespeare.conf --config.reload.automatic 
  </code></pre>
  
  <p>Logstash config:</p>
  
  <pre><code>input {
    file {
      path =&gt; "/home/trex/Development/Shipping_Data_To_ES/shakespeare.json"
      codec =&gt; json {}   
      start_position =&gt; "beginning"
    }
  }
  output {
    stdout {
      codec =&gt; rubydebug
    }
  }
  </code></pre>
  
  <p>Also, I tried with <code>charset</code>:</p>
  
  <pre><code>...
  codec =&gt; json {
    charset =&gt; "UTF-8"
  }
  ...
  </code></pre>
  
  <p>Also, I tried with/without <code>json</code> codec in the input and with filter:</p>
  
  <pre><code>...
  filter {
    json {
      source =&gt; "message"
    }
  }
  ...
  </code></pre>
  
  <p>Logstash console after start:</p>
  
  <pre><code>[2017-02-28T11:37:29,947][WARN ][logstash.agent           ] fetched new config for pipeline. upgrading.. {:pipeline=&gt;"main", :config=&gt;"input {\n  file {\n    path =&gt; \"/home/trex/Development/Shipping_Data_To_ES/shakespeare.json\"\n    codec =&gt; json {\n      charset =&gt; \"UTF-8\"\n    }\n    start_position =&gt; \"beginning\"\n  }\n}\n#filter {\n#  json {\n#    source =&gt; \"message\"\n#  }\n#}\noutput {\n  stdout {\n    codec =&gt; rubydebug\n  }\n}\n\n"}
  [2017-02-28T11:37:29,951][WARN ][logstash.agent           ] stopping pipeline {:id=&gt;"main"}
  [2017-02-28T11:37:30,434][INFO ][logstash.pipeline        ] Starting pipeline {"id"=&gt;"main", "pipeline.workers"=&gt;4, "pipeline.batch.size"=&gt;125, "pipeline.batch.delay"=&gt;5, "pipeline.max_inflight"=&gt;500}
  [2017-02-28T11:37:30,446][INFO ][logstash.pipeline        ] Pipeline main started
  ^C[2017-02-28T11:40:55,039][WARN ][logstash.runner          ] SIGINT received. Shutting down the agent.
  [2017-02-28T11:40:55,049][WARN ][logstash.agent           ] stopping pipeline {:id=&gt;"main"}
  ^C[2017-02-28T11:40:55,475][FATAL][logstash.runner          ] SIGINT received. Terminating immediately..
  The signal INT is in use by the JVM and will not work correctly on this platform
  [trex@Latitude-E5510 Shipping_Data_To_ES]$ ./logstash-5.2.1/bin/logstash -f logstash-5.2.1/config/shakespeare.conf --config.test_and_exit
  ^C[trex@Latitude-E5510 Shipping_Data_To_ES]$ ./logstash-5.2.1/bin/logstash -f logstash-5.2.1/config/shakespeare.conf --confireload.automatic
  ^C[trex@Latitude-E5510 Shipping_Data_To_ES]$ ./logstash-5.2.1/bin/logstash -f logstash-5.2.1/config/shakespeare.conf --config.reload.aumatic
  Sending Logstash's logs to /home/trex/Development/Shipping_Data_To_ES/logstash-5.2.1/logs which is now configured via log4j2.properties
  [2017-02-28T11:45:48,752][INFO ][logstash.pipeline        ] Starting pipeline {"id"=&gt;"main", "pipeline.workers"=&gt;4, "pipeline.batch.size"=&gt;125, "pipeline.batch.delay"=&gt;5, "pipeline.max_inflight"=&gt;500}
  [2017-02-28T11:45:48,785][INFO ][logstash.pipeline        ] Pipeline main started
  [2017-02-28T11:45:48,875][INFO ][logstash.agent           ] Successfully started Logstash API endpoint {:port=&gt;9600}
  </code></pre>
  
  <p>Why Logstash doesn't put my JSON documents in stdout? </p>