Post by ingo on #3 Create an FB
Scripting
snippets
(Post)
Description has changed: Diff: --- old +++ new @@ -42,5 +42,5 @@ if found and len(found) == 1: found[0].remove() else: - print("POU 'MyPou' was not found" + print("POU 'MyPou' was not found") ~~~
Last updated: 2020-02-07
scripting: Artifact 5e3dda70de0956009ebf4afa
Scripting
snippets
(Bin)
Last updated: 2020-02-07
scripting: Artifact 5e3de47ede0956009ebf5131
Scripting
snippets
(Bin)
Last updated: 2020-02-07
home Discussion
Scripting
home
(Discussion)
Forum for home comments
Last updated: 2018-10-27
snippets Discussion
Scripting
snippets
(Discussion)
Forum for snippets comments
Last updated: 2020-02-07
Home
tvm
wiki
(WikiPage)
This is the personal project of tvm. This project is created automatically during user registration as an easy place to store personal data that doesn't need its own project such as cloned repositories.
Last updated: 2018-11-06
(no subject)
tvm
wiki
(Thread)
Last updated: 2018-11-06
Home (version 1) discussion
tvm
wiki
(Thread)
Home (version 1) discussion
Last updated: 2018-11-08
home Discussion
JSON parsing and composing library
home
(Discussion)
Forum for home comments
Last updated: 2018-11-06
code Discussion
JSON parsing and composing library
code
(Discussion)
Forum for code comments
Last updated: 2018-11-06
wiki Discussion
tvm
wiki
(Discussion)
Forum for wiki comments
Last updated: 2018-11-06
JSON parsing and composing library SVN repository
JSON parsing and composing library
code
(SVN Repository)
Last updated: 2020-02-06
Post by kamilp-2097 on Discussion for Home page
JSON parsing and composing library
home
(Post)
Hello, have you managed to solve this case? I am struggling with the same issue. Thanks.
Last updated: 2020-07-23
Post by tvm on Discussion for Home page
JSON parsing and composing library
home
(Post)
good catch, I'll add that to future versions
Last updated: 2020-05-05
Post by jumax on Discussion for Home page
JSON parsing and composing library
home
(Post)
Hello, I have a problem parsing a JSON string and I need help. The string I receive: '[{"device_id":"1","pgt_id":"2","usertag":"3","hgl":"4","ls":"5","rs":"6","erg":"7"}]' The struct I devined: TYPE strPGTdataSet: STRUCT device_id :JSONVAR; pgt_id :JSONVAR; usertag :JSONVAR; hgl :JSONVAR; ls :JSONVAR; rs :JSONVAR; erg :JSONVAR; END_STRUCT END_TYPE The FB I call: ParseJSON( Execute:=xParseJSON, JSONString:= ADR(hTTPClient_0.httpResult.sContent), JSONStringSize:= SIZEOF(hTTPClient_0.httpResult.sContent), JSONVars:= ADR(NewJSONObj), NumberOfVars:= SIZEOF(NewJSONObj) / SIZEOF(JSONVAR) ); The NewJSONObj always remains empty. I also tried to define the NewJSONObj as an array of struct like this: TYPE strPGToutputSet: STRUCT recordset :ARRAY [0..0] OF strPGTdataSet; END_STRUCT END_TYPE I don't know if you need more information to help. Also I'm new to CODESYS programming. Thank you!
Last updated: 2020-05-05
Post by tvm on Discussion for Home page
JSON parsing and composing library
home
(Post)
Hi, I haven't had time to test it, but have you tried recordset :ARRAY [1..1] OF strPGTdataSet;
Last updated: 2020-05-05
Post by schwi on Discussion for Home page
JSON parsing and composing library
home
(Post)
Hi, you should add (GPL_JSON.MAX_VALUE_SIZE) on this string. Because if bigger value sizes it runs into faulty parse. TYPE JSONNAMEVALUE : STRUCT Value: STRING(GPL_JSON.MAX_VALUE_SIZE); //value of the object at this level END_STRUCT END_TYPE Greetings
Last updated: 2020-04-12
Post by tvm on Discussion for Home page
JSON parsing and composing library
home
(Post)
I'll see if I can find some time to test this out.
Last updated: 2020-05-05
Post by nothinrandom on Discussion for Home page
JSON parsing and composing library
home
(Post)
Hello Guys, I believe there's an issue with nested structs on all verions. For example: TYPE stDebugJson : STRUCT timestamp : JSONVAR; messageType : JSONVAR; //message : JSONVAR; //works fine with setting MaxLevel to 1 message : stDebugMessageDetails; // missing end bracket END_STRUCT END_TYPE stDebugMessageDetails is just another type: TYPE stDebugMessageDetails : STRUCT message : JSONVAR; END_STRUCT END_TYPE The output looks like: {"debugMessageJson":{"timestamp":"2020-03-06T23:27:22.966Z","messageType":"DEBUG","message":{"message":"test22"}}
Last updated: 2020-03-06
Post by svenjotec on Discussion for Home page
JSON parsing and composing library
home
(Post)
It's cleared.
Last updated: 2019-12-03
Home (version 1) discussion
JSON parsing and composing library
home
(Thread)
Home (version 1) discussion
Last updated: 2018-11-08
Home (version 4) discussion
JSON parsing and composing library
home
(Thread)
Home (version 4) discussion
Last updated: 2020-03-06
Home (version 2) discussion
JSON parsing and composing library
home
(Thread)
Home (version 2) discussion
Last updated: 2018-12-07
Home (version 3) discussion
JSON parsing and composing library
home
(Thread)
Home (version 3) discussion
Last updated: 2020-02-10
Home
rickj
wiki
(WikiPage)
This is the personal project of rickj. This project is created automatically during user registration as an easy place to store personal data that doesn't need its own project such as cloned repositories.
Last updated: 2018-11-06