com.github.kondaurovdev.json.j4s.JsonBuilder.scala Maven / Gradle / Ivy
package com.github.kondaurovdev.json.j4s
import com.github.kondaurovdev.json_iface.JsonBuilderIface
import org.json4s.JsonAST._
class JsonBuilder extends JsonBuilderIface[JValue] {
def obj(props: List[(String, JValue)]): JValue = {
JObject(props)
}
def arr(vals: List[JValue]): JArray = {
JArray(vals)
}
def str(s: String): JValue = JString(s)
def number(num: Int): JValue = JInt(num)
def getNull: JValue = JNull
}