handle json inputs in function attributes