title: Processing JSON from a .txt file and converting to a DataFrame in Julia
body: <p>Cross posting from <a href="https://discourse.julialang.org/t/processing-json-from-a-txt-file-and-converting-to-a-dataframe/61119" rel="nofollow noreferrer">Julia Discourse</a> in case anyone here has any leads.</p>
  <p>I’m just looking for some insight into why the below code is returning a dataframe containing just the first line of my json file. If you’d like to try working with the file I’m working with, you can download the aminer_papers_0.zip from the <a href="https://www.microsoft.com/en-us/research/project/open-academic-graph/" rel="nofollow noreferrer">Microsoft Open Academic Graph site</a>, I’m using the first file in that group of files.</p>
  <pre><code>using JSON3, DataFrames, CSV
  file_name = &quot;path/aminer_papers_0.txt&quot;
  json_string = read(file_name, String)
  js = JSON3.read(json_string)
  df = DataFrame([js])
  </code></pre>
  <p>The resulting DataFrame has just one line, but the column titles are correct, as is the first line. To me the mystery is why the rest isn’t getting processed. I think I can rule out that read() is only reading the first JSON object, because I can index into the resulting object and see many JSON objects:</p>
  <p><a href="https://i.stack.imgur.com/Be4Lb.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>My first guess was maybe the newline \n was causing escape issues, and tried to use chomp to get rid of them, but couldn’t get it to work.</p>
  <p>Anyway - any help would be greatly appreciated!</p>