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

org.json4s.JsonInput.scala Maven / Gradle / Ivy

There is a newer version: 4.1.0-M8
Show newest version
package org.json4s

import java.io.InputStream

sealed abstract class JsonInput extends Product with Serializable {
  private[json4s] def toReader(): java.io.Reader = this match {
    case StringInput(x) =>
      new java.io.StringReader(x)
    case ReaderInput(x) =>
      x
    case StreamInput(x) =>
      new java.io.InputStreamReader(x, "UTF-8")
  }
}
case class StringInput(string: String) extends JsonInput
case class ReaderInput(reader: java.io.Reader) extends JsonInput
case class StreamInput(stream: InputStream) extends JsonInput




© 2015 - 2024 Weber Informatics LLC | Privacy Policy