Write a map with key as int to json in scala using json4s -
i trying write map in key int json string not able so: import org.json4s._ import org.json4s.jackson.jsonmethods._ import org.json4s.jsondsl._ object myobject { def main(args: array[string]) { // works fine //val mymap = map("a" -> list(3,4), "b" -> list(7,8)) // not work val mymap = map(4 -> map("a" -> 5)) val jsonstring = pretty(render(mymap)) println(jsonstring) } i receiving following error: [error] /my_stuff/my_file.scala:14: overloaded method value render alternatives: [error] (value: org.json4s.jvalue)org.json4s.jvalue <and> [error] (value: org.json4s.jvalue)(implicit formats: org.json4s.formats)org.json4s.jvalue [error] cannot applied (scala.collection.immutable.map[int,scala.collection.immutable.map[string,int]]) [error] val jsonstring = pretty(render(mymap)) [error] ^ [error] 1 error found [error] (compile:compileincremental) compilation failed i vaguely