title: How to read the JSON file from HDFS path and use instead of MAP in Scala code
body: <pre class="lang-scala prettyprint-override"><code>val airportCodeToTimezoneMap = Map(&quot;MAA&quot; -&gt; &quot;Asia/Kolkata&quot; , &quot;SHJ&quot; -&gt; &quot;Asia/Dubai&quot;) 
  
  val boardPoint =  &quot;MAA&quot; 
  
  if( airportCodeToTimezoneMap.contains( boardPoint )) {
    println(&quot;Code  exists with value :&quot;  + airportCodeToTimezoneMap(boardPoint))
  } else {
    println(&quot;Code Not exist&quot;)
  }
  
  val tempValue = airportCodeToTimezoneMap(boardPoint) 
  
  println(tempValue)
  </code></pre>
  <p>Here instead of
  MAP i want to configure in JSON File in HDFS path and use it .</p>
  <p>Say For E.G</p>
  <pre><code>    {
        &quot;airportCode&quot;: &quot;AAL&quot;,
        &quot;zoneId&quot;: &quot;Europe/Copenhagen&quot;
      },
      {
        &quot;airportCode&quot;: &quot;AAM&quot;,
        &quot;zoneId&quot;: &quot;Africa/Johannesburg&quot;
      }
  </code></pre>
  <p>Please tell me how to write it .</p>