title: How do you read JSON files in apache beam (dataflow) via python?
body: <p>I'm trying to read a JSON file via apache beam in python and apply some data quality rules over it. 
  Currently I'm using beam.io.ReadFromText to read each json line and use some functions to modify the data. 
  What would be a better way to read the JSON data and modify them ?</p>
  
  <pre><code>(p
    | 'Getdata' &gt;&gt; beam.io.ReadFromText(input)
    | 'filter_name' &gt;&gt; beam.FlatMap(lambda line: dq_name(line))
    | 'filter_phone' &gt;&gt; beam.FlatMap(lambda line: dq_phone(line))
    | 'filter_zip' &gt;&gt; beam.FlatMap(lambda line: dq_zip(line))
    | 'filter_address' &gt;&gt; beam.FlatMap(lambda line: dq_city(line))
    | 'filter_website' &gt;&gt; beam.FlatMap(lambda line: dq_website(line))
    | 'write' &gt;&gt; beam.io.WriteToText(output_prefix)  )
  </code></pre>
  
  <p>Note: I'm fairly new to this, I'm sorry if my current approach looks too shoddy of stupid. </p>