# `Dagger.JSONValue`
[🔗](https://github.com/dagger/dagger/blob/v0.20.5/sdk/elixir/lib/dagger/gen/json_value.ex#L2)

Dagger.JSONValue

# `t`

```elixir
@type t() :: %Dagger.JSONValue{client: term(), query_builder: term()}
```

# `as_array`

```elixir
@spec as_array(t()) :: {:ok, [t()]} | {:error, term()}
```

Decode an array from json

# `as_boolean`

```elixir
@spec as_boolean(t()) :: {:ok, boolean()} | {:error, term()}
```

Decode a boolean from json

# `as_integer`

```elixir
@spec as_integer(t()) :: {:ok, integer()} | {:error, term()}
```

Decode an integer from json

# `as_string`

```elixir
@spec as_string(t()) :: {:ok, String.t()} | {:error, term()}
```

Decode a string from json

# `contents`

```elixir
@spec contents(t(), pretty: boolean() | nil, indent: String.t() | nil) ::
  {:ok, Dagger.JSON.t()} | {:error, term()}
```

Return the value encoded as json

# `field`

```elixir
@spec field(t(), [String.t()]) :: t()
```

Lookup the field at the given path, and return its value.

# `fields`

```elixir
@spec fields(t()) :: {:ok, [String.t()]} | {:error, term()}
```

List fields of the encoded object

# `id`

```elixir
@spec id(t()) :: {:ok, Dagger.JSONValueID.t()} | {:error, term()}
```

A unique identifier for this JSONValue.

# `new_boolean`

```elixir
@spec new_boolean(t(), boolean()) :: t()
```

Encode a boolean to json

# `new_integer`

```elixir
@spec new_integer(t(), integer()) :: t()
```

Encode an integer to json

# `new_string`

```elixir
@spec new_string(t(), String.t()) :: t()
```

Encode a string to json

# `with_contents`

```elixir
@spec with_contents(t(), Dagger.JSON.t()) :: t()
```

Return a new json value, decoded from the given content

# `with_field`

```elixir
@spec with_field(t(), [String.t()], t()) :: t()
```

Set a new field at the given path

---

*Consult [api-reference.md](api-reference.md) for complete listing*
