JsonView

struct JsonView

A view over a JSON value of unknown type.

Instance fields

const char[]

Instance members

bool

Parses this view as a bool, returning false for non-true views.

double

Parses this view as a double, returning zero for non-number views.

int

Parses this view as an int, returning zero for non-number views.

const char[]

Returns the escaped contents of a string view without the surrounding quotes.

iter JsonView

Iterates array elements, yielding nothing unless this view is an array.

JsonType
getType()
property

Determines the value kind represented by this view.

bool

Returns true when this view is the JSON false literal.

bool

Returns true when this view is the JSON null literal.

bool

Returns true when this view is the JSON true literal.

iter JsonProperty

Iterates object properties, yielding nothing unless this view is an object.

const char[]

Returns the trimmed source span for this value, or an empty span when invalid.

Generated with campc 0.11.0-preview.1.