CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Mon Feb 24, 2020 10:09 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
 Post subject: JSON to WSTRING
PostPosted: Wed Dec 04, 2019 5:57 pm 
Offline

Joined: Mon Apr 15, 2019 5:14 pm
Posts: 2
Hi,

How would I format a JSON string to WSTRING?
e.g.
Code:
wsPostValue : WSTRING(100) := "{"id":"test","value":"10"}"

I'm trying to use the WEB_CLIENT.WebClient demo project and at build the wsPostValue does not accept double quotes within the string.

thanks,
Rich


Top
   
 Post subject: Re: JSON to WSTRING
PostPosted: Wed Dec 04, 2019 6:19 pm 
Offline
Frequent User
Frequent User

Joined: Tue Dec 03, 2013 11:52 pm
Posts: 126
I believe you are looking for this:
Code:
wsPostValue : WSTRING(100) := "{$"id$":$"test$",$"value$":$"10$"}";


Top
   
 Post subject: Re: JSON to WSTRING
PostPosted: Thu Dec 05, 2019 11:04 am 
Offline

Joined: Mon Apr 15, 2019 5:14 pm
Posts: 2
Thanks - that worked :D

Comingback4u wrote:
I believe you are looking for this:
Code:
wsPostValue : WSTRING(100) := "{$"id$":$"test$",$"value$":$"10$"}";


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited