diff options
Diffstat (limited to 'scalalib/src/test/resource/jawn/support/rojoma/src/main/scala/Parser.scala')
-rw-r--r-- | scalalib/src/test/resource/jawn/support/rojoma/src/main/scala/Parser.scala | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scalalib/src/test/resource/jawn/support/rojoma/src/main/scala/Parser.scala b/scalalib/src/test/resource/jawn/support/rojoma/src/main/scala/Parser.scala new file mode 100644 index 00000000..c0725ea3 --- /dev/null +++ b/scalalib/src/test/resource/jawn/support/rojoma/src/main/scala/Parser.scala @@ -0,0 +1,18 @@ +package jawn +package support.rojoma + +import scala.collection.mutable +import com.rojoma.json.ast._ + +object Parser extends SupportParser[JValue] { + implicit val facade: Facade[JValue] = + new MutableFacade[JValue] { + def jnull() = JNull + def jfalse() = JBoolean.canonicalFalse + def jtrue() = JBoolean.canonicalTrue + def jnum(s: CharSequence, decIndex: Int, expIndex: Int) = JNumber(BigDecimal(s.toString)) + def jstring(s: CharSequence) = JString(s.toString) + def jarray(vs: mutable.ArrayBuffer[JValue]) = JArray(vs) + def jobject(vs: mutable.Map[String, JValue]) = JObject(vs) + } +} |