Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hi ,
I have service through which I am getting output in Infotable format and there is a Json data in the output now I want to show that Json data in UI so for that I have used text area widget but I can't bind it so please help me here
Regards,
Lav
The type of your service result will have to be changed to STRING.
Hi @LY_10691079 ,
Not sure if any widget directly accepts Json as input type.
You may give the output type as 'String' in the service and use text area widget.
With regards
Yedukrishnan
Thanks for your reply, I given that but the output I can't see in UI when I bind but if you can show any demo it will be good
Thanks
Lav
Hi @LY_10691079 ,
Please find the example as below.
1. Service output for JSON as STRING
2. Service binding in mashup
3. Output in UI
With regards
Yedukrishnan
additionaly can also be used with pretty print of the JSON object if needed. Check the docs of JSON.stringify with the additional params. E.g. to use 3 spaces for indentation could use:
JSON.stringify({abc:12,def:"text"}, undefined, 3)