LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

WebService POST, GET and JSON data result

Solved!
Go to solution

Hello,

 

I have a problem in LV2020 using WebServices where LV webservice JSON output format is transforming my string in UTF-8 format to a new string, adding {"String": to the beginning of the JSON string and escape characters (backslahes). 

(I tried with and without UTF-8 conversion of my JSON example string, but no good result.) 

 

Now I would like to use Labview webservice in combination with a webbrowser and present the JSON with Figma in a nice mobile app. There are JSON tools in Figma, but they expect correct JSON handover.)

Is there any way to present correct JSON code using WebService? What am I doing wrong? 

0 Kudos
Message 1 of 3
(971 Views)
Solution
Accepted by topic author wmswe

If you want to use the Write Response VI then you need to configure the Output Type to Stream. See the Write Response VI documentation:

 

Writes a streaming response string for top-level VIs configured to use stream output mode on the HTTP Method VI Settings page of the Web Service Properties dialog box.

MilanR_0-1656278960819.png

 


Milan
0 Kudos
Message 2 of 3
(947 Views)

Tx Milan. That solved my problem. 😀

0 Kudos
Message 3 of 3
(909 Views)