Complex data structures json
Posted: Thu Oct 08, 2020 5:00 pm
Hello,
i want to export some data and use the json-Format. But it is returning an empty json-object.
mapping data = makeMapping(makeTime(2020,1,1), makeMapping("dp1.value", 596.9,"dp2.value", 915.9),
makeTime(2020,1,1,1), makeMapping("dp1.value", 984.5,"dp2.value", 564.5));
DebugN(data,jsonEncode(data));
Result:
WCCOAui2:[mapping 2 items
WCCOAui2:2020.01.01 00:00:00.000000000 : mapping 2 items
WCCOAui2: "dp2.value" : 915.9
WCCOAui2: "dp1.value" : 596.9
WCCOAui2:2020.01.01 01:00:00.000000000 : mapping 2 items
WCCOAui2: "dp2.value" : 564.5
WCCOAui2: "dp1.value" : 984.5
WCCOAui2:]["{}"]
Is this a bug or not a feature?
i want to export some data and use the json-Format. But it is returning an empty json-object.
mapping data = makeMapping(makeTime(2020,1,1), makeMapping("dp1.value", 596.9,"dp2.value", 915.9),
makeTime(2020,1,1,1), makeMapping("dp1.value", 984.5,"dp2.value", 564.5));
DebugN(data,jsonEncode(data));
Result:
WCCOAui2:[mapping 2 items
WCCOAui2:2020.01.01 00:00:00.000000000 : mapping 2 items
WCCOAui2: "dp2.value" : 915.9
WCCOAui2: "dp1.value" : 596.9
WCCOAui2:2020.01.01 01:00:00.000000000 : mapping 2 items
WCCOAui2: "dp2.value" : 564.5
WCCOAui2: "dp1.value" : 984.5
WCCOAui2:]["{}"]
Is this a bug or not a feature?