title: Scala's JSON library not working properly
body: <p>I have my Apache Flink program:</p>
  
  <pre><code>import org.apache.flink.api.scala._
  import scala.util.parsing.json._
  
  object numHits extends App {
      val env = ExecutionEnvironment.getExecutionEnvironment
      val data=env.readTextFile("file:///path/to/json/file")
      val j=data.map { x =&gt; ("\"\"\""+x+"\"\"\"") }
      /*1*/ println( ((j.first(1).collect())(0)).getClass() )
  
      /*2*/ println( ((j.first(1).collect())(0)) ) 
  
      /*3*/ println( JSON.parseFull((j.first(1).collect())(0)) )
      }
  </code></pre>
  
  <p>I want to parse the input JSON file into normal scala Map and for that I am using the default <code>scala.util.parsing.json._</code> library.</p>
  
  <p>The output of the first <code>println</code> statement is <code>class java.lang.String</code> which is required by the JSON parsing function.</p>
  
  <p>Output of the second <code>println</code> function is the actual JSON string appended and prepended by <code>"\"\"\""</code> which is also required by the JSON parser.</p>
  
  <p>Now at this point if I copy the output of the second <code>println</code> command printed in the console and pass it to the <code>JSON.parseFull()</code> function, it properly parses it.</p>
  
  <p>Therefore the third <code>println</code> function should properly parse the same string passed to it but it does not as it outputs a "None" string which means it failed.</p>
  
  <p>Why does this happen and how can I make it work?</p>