All Downloads are FREE. Search and download functionalities are using the official Maven repository.

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy