Sorry, never meant that that was âJSONâ. I just meant the structure I am using has two levels.
OK here is my JSON:
{
"statusInfo": {
"status": "ONLINE",
"statusDetail": "NONE"
},
"editable": true,
"label": "Z-Wave Node 015: YKFCON Smart Living Keyfree Smart Lock",
"bridgeUID": "zwave:serial_zstick:71bc65a0",
"configuration": {
"binding_cmdrepollperiod": 1500,
"doorlock_timeout": 0,
"usercode_label_6": "Kathy",
"group_1": [
"controller"
],
"usercode_label_2": "Abi",
"action_reinit": false,
"usercode_code_20": "",
"usercode_code_16": "",
"usercode_code_17": "",
"usercode_code_18": "",
"usercode_code_19": "",
"action_failed": false,
"action_remove": false,
"binding_pollperiod": 86400,
"usercode_code_7": "",
"action_heal": false,
"usercode_code_8": "",
"config_1_1": 1,
"usercode_code_9": "",
"config_2_1": 255,
"usercode_label_1": "Milo",
"usercode_code_3": "111111",
"usercode_code_4": "",
"usercode_code_5": "",
"usercode_code_6": "111111",
"config_7_1": 30,
"usercode_code_12": "",
"config_8_1": 0,
"usercode_code_13": "",
"usercode_code_1": "111111",
"usercode_code_14": "",
"usercode_code_2": "111111",
"usercode_code_15": "",
"config_3_1": 50,
"config_4_1": 5,
"config_5_1": 1,
"usercode_code_10": "",
"node_id": 15,
"usercode_code_11": ""
},
"UID": "zwave:device:71bc65a0:node15",
"thingTypeUID": "zwave:yale_ykfcon_00_000"
}
So If I push this through a transform JSONPATH with just the $.configuration filter I would have expected somthing like this:
{
"binding_cmdrepollperiod": 1500,
"doorlock_timeout": 0,
"usercode_label_6": "Kathy",
"group_1": [
"controller"
],
"usercode_label_2": "Abi",
"action_reinit": false,
"usercode_code_20": "",
"usercode_code_16": "",
"usercode_code_17": "",
"usercode_code_18": "",
"usercode_code_19": "",
"action_failed": false,
"action_remove": false,
"binding_pollperiod": 86400,
"usercode_code_7": "",
"action_heal": false,
"usercode_code_8": "",
"config_1_1": 1,
"usercode_code_9": "",
"config_2_1": 255,
"usercode_label_1": "Milo",
"usercode_code_3": "111111",
"usercode_code_4": "",
"usercode_code_5": "",
"usercode_code_6": "111111",
"config_7_1": 30,
"usercode_code_12": "",
"config_8_1": 0,
"usercode_code_13": "",
"usercode_code_1": "111111",
"usercode_code_14": "",
"usercode_code_2": "111111",
"usercode_code_15": "",
"config_3_1": 50,
"config_4_1": 5,
"config_5_1": 1,
"usercode_code_10": "",
"node_id": 15,
"usercode_code_11": ""
}
But instead I get this:
{
binding_cmdrepollperiod=1500,
doorlock_timeout=0,
usercode_label_6=Kathy,
group_1=[
"controller"
],
usercode_label_2=Abi,
action_reinit=false,
usercode_code_20=,
usercode_code_16=,
usercode_code_17=,
usercode_code_18=,
usercode_code_19=,
action_failed=false,
action_remove=false,
binding_pollperiod=86400,
usercode_code_7=,
action_heal=false,
usercode_code_8=,
config_1_1=1,
usercode_code_9=,
config_2_1=255,
usercode_label_1=Milo,
usercode_code_3=111111,
usercode_code_4=,
usercode_code_5=,
usercode_code_6=111111,
config_7_1=30,
usercode_code_12=,
config_8_1=0,
usercode_code_13=,
usercode_code_1=111111,
usercode_code_14=,
usercode_code_2=111111,
usercode_code_15=,
config_3_1=50,
config_4_1=5,
config_5_1=1,
usercode_code_10=,
node_id=15,
usercode_code_11=
}
I wanted to store this in JSON to call the values whenever I wanted but when I try and transform this I get this error:
17:07:29.837 [ERROR] [untime.internal.engine.RuleEngineImpl] - Rule 'LFD Test': An error occurred during the script execution: Could not invoke method: org.eclipse.smarthome.core.transform.actions.Transformation.transform(java.lang.String,java.lang.String,java.lang.String) on instance: null
Which is right.
So my question is, is there any method of extracting the configuration
section as a JSON string from the main section without losing the quotation marks?