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

ujson.package.scala Maven / Gradle / Ivy

There is a newer version: 0.6.3
Show newest version
package object ujson{
  def transform[T](t: Transformable, v: Visitor[_, T]) = t.transform(v)

  def read(s: Transformable): Js.Value = transform(s, Js)

  def write(t: Js.Value, indent: Int = -1): String = {
    transform(t, StringRenderer(indent)).toString
  }

  def writeTo(t: Js.Value, out: java.io.Writer, indent: Int = -1): String = {
    transform(t, Renderer(out, indent)).toString
  }

  def validate(s: Transformable): Unit = transform(s, NoOpVisitor)

  def reformat(s: Transformable, indent: Int = -1): String = {
    transform(s, StringRenderer(indent)).toString
  }

  def reformatTo(s: Transformable, out: java.io.Writer, indent: Int = -1): Unit = {
    transform(s, Renderer(out, indent)).toString
  }
  // End ujson
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy