A few things that i notice with your json;
- default_value can never have a python function, use value instead.
- Things that need to be evaluated by python (such as; 5 if machine_type == \"A\" else 3 if machine_type == \"B\" else 9) need to be enclosed by ""
- default_value must be a part of a setting.
So if you take that into account, the json would be someting like
"input_paramA":
{
"label": "Second JSON",
"description": "Beep bop boop",
"unit": "mm",
"type": "float",
"default_value": 5,
"value": "5 if machine_type == \"A\" else 3 if machine_type == \"B\" else 9"
}
Recommended Posts
Kin 3
I am going to checkout tomorrow the codeacademy on JSON, https://www.codecademy.com/courses/javascript-beginner-en-xTAfX/0/1, I'm hoping it gets my somewhere.
Link to post
Share on other sites