Skip to content

JsonNavUtil

[Source]

Utility for extracting optional string fields from JSON.

JsonNav does not have an as_string_or_none() method. This primitive provides equivalent functionality: given a JsonNav positioned on a field, it returns the String value if present or None if the JSON value is null. Raises an error if the navigation failed (key missing) or the value is any other type.

primitive val JsonNavUtil

Constructors

create

[Source]

new val create()
: JsonNavUtil val^

Returns


Public Functions

string_or_none

[Source]

fun box string_or_none(
  json: JsonNav val)
: (String val | None val) ?

Parameters

Returns


eq

[Source]

fun box eq(
  that: JsonNavUtil val)
: Bool val

Parameters

Returns


ne

[Source]

fun box ne(
  that: JsonNavUtil val)
: Bool val

Parameters

Returns