How to Send a Response as JSON Format From LabVIEW Web Service

Updated Oct 12, 2023

Reported In


  • LabVIEW

Issue Details

I want to create a method VI in my LabVIEW Web Service that sends out a response as JSON format.
I know how to configure the terminal output of a method VI to send a response as JSON format, but I do not want to use terminal to send out a response.
How can I send a response as JSON format from my method VI without using its terminal?


You can use combination of Set HTTP, Flatten To, and Write .
To send a response as JSON format, set "Content-Type" header to use "application/json" using Set HTTP
Flatten To will convert your data into a UTF-8 JSON string, which you can input into Write as a body of the response.