Alternera.Plugin.ValueType (alternera_plugin_sdk v0.9.0)

Copy Markdown View Source

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

Summary

Functions

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.

Functions

convert(value, arg2)

@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.