Hi,
I am new to the Thingworx. I have followed the https://developer.thingworx.com/en .
The example uses .xml file for import. Instead of that I want to use JSON file.
How can I do that? Please guide.
Regards,
shreekant
Please do a search through the Forum as there are plenty of articles on importing JSON
but similar to the XML example, there is a content loader function to retrieve JSON content
Thingworx will automatically make that into an object.
Please note if the JSON is an array at the top level, Thingworx will add a level called array
i.e. jsonObject.array.[your json structure here]
Hi,
Thanks for your reply. But as I said that I am a beginner to this, I am not sure from where to start. I have followed getting start guide and created dashboard on hosted server. Now I want to use same example but just want to add .json file instead of .xml file. It would be much helpful for me if you let me the steps for doing this.
Regards,
shreekant
Greetings,
Is there a particular TWX DevPortal guide with which you're having issue?
Are there specific instructions that aren't working correctly?
If so, please provide us with a URL of the guide in question, and we'd be happy to investigate.
Thank you,
Jason
Sorry, But I don't have such link.
Are you trying to load a JSON flat file, or are you trying to grab the JSON from an API?
If it is a flat file, you will need to upload the file to a Thingworx FileRepository Thing and leverage the FileRepository's LoadJSON service and then parse the returned JSON object in a wrapper service.
If you are calling an API, you can use the ContentLoaderFunction resource (in the Snippet Library) to call the GetJSON service.
Hi,
Thanks for your reply. Unfortunately my Host server evaluation period has been expired.
I am putting this topic on hold for now.
Thanks for your support.
Regards,
shreekant
Just as further information, please do note that even if your 30-day hosted server period has expired, we still offer downloadable trials with a longer 90-day window.
https://developer.thingworx.com/en/resources/downloads
Thank you,
Jason