title: How exactly does bufferedReader() work in Kotlin?
body: <p>So I'm trying to read data from a <code>.json</code> file in my Android project:</p>
  
  <pre><code>val file = context.assets.open("myfile.json").bufferedReader().readText()
  </code></pre>
  
  <p>This works fine and successfully prints out my <code>.json</code> file as one <code>String</code>. </p>
  
  <p>However I want to know what exactly is <code>bufferedReader()</code> and why <code>.readText()</code> can't be called directly on the opened <code>.json</code> file.</p>
  
  <p>PS: <code>readText()</code> returns a <code>String</code>. However:</p>
  
  <p><code>val json2: JSONObject = JSONObject("mystring")</code> returns:</p>
  
  <pre><code>Caused by: org.json.JSONException: Value mystring of type java.lang.String cannot be converted to JSONObject
  </code></pre>
  
  <p>How does this make sense?</p>