I am using json library to handle json objects in Scala. To get the id field from a json object, I run this code:
val id = json \ "id"
Then I want to convert id to string. I tried id.get.toString , but instead of doi:10.1186-s13612-016-0045-3 got JsDefined("doi:10.1186-s13612-016-0045-3")
How to convert it to string?
source share