A node that takes a JSON-formatted value as a string and outputs that value
cast to BOOL, INT, FLOAT, and STRING (without quotes).
Class methods
-------------
INPUT_TYPES (dict):
Defines the input field for this node: a single-line JSON value string.
Attributes
----------
RETURN_TYPES (`tuple`):
The types of the output tuple: (BOOL, INT, FLOAT, STRING).
RETURN_NAMES (`tuple`):
The names of each output ("as_bool", "as_int", "as_float", "as_string").
FUNCTION (`str`):
The name of the entry-point method. This node uses "execute".
CATEGORY (`str`):
The category under which this node appears in the UI ("JSON").
execute(json_value) -> tuple:
Parses the JSON value and returns a tuple:
- BOOL: The boolean interpretation of the value.
- INT: The integer interpretation (or 0 if not convertible).
- FLOAT: The float interpretation (or 0.0 if not convertible).
- STRING: The string interpretation without quotation marks.
By SummonTheCat·Created about a year ago·Updated about a year ago· 0