Comments (2)
Hi,
I'm feeding the json data directly into JSON-Parser(11087).
In the logic editor I used the worksheet monitoring function to debug the module.
Initially as mentioned the Output "nrg / json" was completely empty, then I tried to insert
self._set_output_value(self.PIN_O_NRG_JSON, str(nrg_json)), the output did now show values but was truncated in the worksheet monitor in the ouput as well as in the input of the JSON Parser module, but showed more than 14 Byte. Additionally the JSON parser module did not successfully parse any data even if I used a key which i could see in the truncated data.
I assumed that it was due to the truncated output, so split the data into 3 separate fields. But the JSON-Parser still wasn't working. I noticed that instead of double quotes (") single quotes (') where put out which is not according to JSON specification. (e.g. {'V L1': 230.0})
Only after replacing the string with the json.dumps function in the output it started to work.
self._set_output_value(self.PIN_O_NRG_JSON_POWERFACTOR, json.dumps(nrg_json_powerfactor))
What i did not test anymore is if the truncated output would be processed correctly internally using the json.dumps() function instead of the str() function.
regards
from 14105_go-echarger.
What did you to to figure out that the output json is truncated?
As far as I know: If you put the output to an 14-Byte text variable, it'll be tuncated after 14 byte but if you directly forward it into an other logic module, it should be processed completely.
from 14105_go-echarger.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 14105_go-echarger.