# `Alternera.Plugin.ValueType`
[🔗](https://github.com/10e-ab/alternera-sdk/blob/v0.9.0/alternera_plugin_sdk/lib/alternera/plugin/value_type.ex#L1)

The value types a declared parameter or context entry can have: `text`,
`number`, `boolean` and `json`.

# `convert`

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

`value` as `type`: `{:ok, converted}` or `:error`. text takes text as
is and any other value as its JSON text; number takes a number or a
text that reads as an integer or a decimal (`1.5e-3` too, not `.5` or
`1.`); boolean takes `true`, `false` or their text; json takes any
value and parses a text.

---

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