java.lang.IllegalStateException: Not a JSON Array

Level 1
java.lang.IllegalStateException: Not a JSON Array

I am trying to define an input  parameter for a custom Plugin recipe. I want the input to be a list of strings. It could well be only one string in the list but that is fine.

I have defined the recipe.json file as so:

"name": "indicator_id",
"label": "indicator_id",
"type": "STRINGS",
"description": ".<Some text here>",
"mandatory": true

If i input a single string in the recipe UI, say "indicator1" i get the following error:

java.lang.IllegalStateException: Not a JSON Array: "indicator1"

What type of object is returned when using  get_recipe_config()['indicator_id']? How can i configure this to just return a list with the strings in the input?


Operating system used: Ubuntu

0 Kudos
1 Reply

Hi @ds_stat 

We have usually been able to use TEXTS parameter in our plugins.

It returns a list of texts that you have entered
For example if you entered the values as 

indicator1 indicator2

the output of get_recipe_config() will be {'indicator_id': ['indicator1', 'indicator2']}

Which version of DSS are you using ? Maybe it will help the dataiku team debug your issue further.

0 Kudos