Decodes a T from one piece of text: an integer, float, bool, string or enum. from_param(int, "42") is 42; from_param(Color, "red") the member red; a string is taken as it is.
from_param :: (
$T: Type,
text: string,
options := Json_Options.{}
) -> (T, Json_Error)
Decodes a T from one piece of text: an integer, float, bool, string or enum. from_param(int, "42") is 42; from_param(Color, "red") the member red; a string is taken as it is.
Parameters
- $T: Type
- text: string
- options := Json_Options.{}
Returns
- T