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

.jawn-play_3.0.0-M3.1.0.3.source-code.Parser.scala Maven / Gradle / Ivy

The newest version!
package org.typelevel.jawn
package support.play

import play.api.libs.json._

object Parser extends SupportParser[JsValue] {

  implicit val facade: Facade[JsValue] =
    new Facade.SimpleFacade[JsValue] {
      def jnull: JsValue = JsNull
      val jfalse: JsValue = JsBoolean(false)
      val jtrue: JsValue = JsBoolean(true)

      def jnum(s: CharSequence, decIndex: Int, expIndex: Int): JsValue = JsNumber(BigDecimal(s.toString))
      def jstring(s: CharSequence): JsValue = JsString(s.toString)

      def jarray(vs: List[JsValue]): JsValue = JsArray(vs)
      def jobject(vs: Map[String, JsValue]): JsValue = JsObject(vs)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy