JsonReader

trait JsonReader extends AutoCloseable

Defines JSON reader.

import little.json.*
import little.json.Implicits.given
import scala.language.implicitConversions

val in = JsonReader("""{ "id": 1000, "name": "jza" }""")

try
 val user = in.read()
 assert { user("id").as[Int] == 1000 }
 assert { user("name").as[String] == "jza" }
finally
 in.close()
See also
Companion
object
trait AutoCloseable
class Object
trait Matchable
class Any

Value members

Abstract methods

def close(): Unit

Closes reader.

Closes reader.

Reads JSON structure.

Reads JSON structure.