io.vertx.lang.scala.json

Scala extensions for more idiomatic handling of io.vertx.core.json.JsonObject and io.vertx.core.json.JsonArray.

Attributes

Members list

Type members

Classlikes

object Json

Builder for constructing JsonObjects and JsonArrays.

Builder for constructing JsonObjects and JsonArrays.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Json.type
final case class JsonPointer(internal: JJsonPointer)

Implementation of RFC6901 Json Pointers. This wraps io.vertx.core.json.pointer.JsonPointer and makes it behave more Scala-like.

Implementation of RFC6901 Json Pointers. This wraps io.vertx.core.json.pointer.JsonPointer and makes it behave more Scala-like.

Value parameters

internal

the wrapped Vert.x io.vertx.core.json.pointer.JsonPointer

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object JsonPointer

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Types

type JsonArray = JsonArray

Type alias which provides extensions for idiomatic Scala, like asList.

Type alias which provides extensions for idiomatic Scala, like asList.

Attributes

type JsonObject = JsonObject

Type alias which provides extensions for idiomatic Scala, like asMap.

Type alias which provides extensions for idiomatic Scala, like asMap.

Attributes

Extensions

Extensions

extension (internal: JsonObject)
def asMap: Map[String, AnyRef]

Get the underlying Map as an immutable Map. Unlike Vert.x core's io.vertx.core.json.JsonObject.getMap, this method guarantees to convert every contained JsonObject or JsonArray into a Map or List, respectively. That's done, however, at the cost of one pass through each contained JsonObject or JsonArray.

Get the underlying Map as an immutable Map. Unlike Vert.x core's io.vertx.core.json.JsonObject.getMap, this method guarantees to convert every contained JsonObject or JsonArray into a Map or List, respectively. That's done, however, at the cost of one pass through each contained JsonObject or JsonArray.

Attributes

extension (internal: JsonArray)
def asList: List[Any]

Get the underlying List as an immutable List. Unlike Vert.x core's io.vertx.core.json.JsonArray.getList, this method guarantees to convert every contained JsonObject or JsonArray into a Map or List, respectively. That's done, however, at the cost of one pass through each contained JsonObject or JsonArray.

Get the underlying List as an immutable List. Unlike Vert.x core's io.vertx.core.json.JsonArray.getList, this method guarantees to convert every contained JsonObject or JsonArray into a Map or List, respectively. That's done, however, at the cost of one pass through each contained JsonObject or JsonArray.

Attributes

extension (sc: StringContext)
def json(args: Any*): JsonObject

Interpolates the given String as a JsonObject.

Interpolates the given String as a JsonObject.

Attributes

def jsonArray(args: Any*): JsonArray

Interpolates the given String as a JsonArray.

Interpolates the given String as a JsonArray.

Attributes