JsonReader

grapple.json.JsonReader
See theJsonReader companion object
trait JsonReader extends AutoCloseable

Defines JSON reader.

import scala.language.implicitConversions

import grapple.json.{ *, given }

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

try
 val user = in.read()
 assert { user("id").as[Int] == 1000 }
 assert { user("name").as[String] == "lupita" }
finally
 in.close()

Attributes

See also
Companion
object
Graph
Supertypes
trait AutoCloseable
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def close(): Unit

Closes reader.

Closes reader.

Attributes

Reads JSON structure.

Reads JSON structure.

Attributes

Throws
JsonException

if it cannot read JSON structure