title: Scala Seq Object to JSON using gson Library
body: <p>I am trying to do the following:</p>
  
  <pre><code>`import com.google.gson.Gson
  
   object someObject extends App{
        case class entries(a:Seq[String], b:String){
           def toJson() = new Gson().toJson(this)
        }
  
        val one : Seq[String] = List("m","n")
        val two : String = "ok"
  
        val ans = entries(a = one, b = two)
        println(ans.toJson)
   }`
  </code></pre>
  
  <p>I am getting the following output:</p>
  
  <pre><code> `{"a":{},"b":"ok"}`
  </code></pre>
  
  <p>Can i know why i am not able to convert the seq to json?
  I tried other libraries including spray.json and json4s but no help. Tried a lot over this. </p>
  
  <p>Any help is appreciated. Other similar answers did not help.</p>