cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

while i am using the snippet getJSON and converting the json received into infotable, I am getting the following error: com.thingworx.dsl.engine.adapters.ThingworxInfoTableAdapter cannot be cast to com.thingworx.types.InfoTable

psaxena
1-Newbie

while i am using the snippet getJSON and converting the json received into infotable, I am getting the following error: com.thingworx.dsl.engine.adapters.ThingworxInfoTableAdapter cannot be cast to com.thingworx.types.InfoTable

com.thingworx.dsl.engine.adapters.ThingworxInfoTableAdapter cannot be cast to com.thingworx.types.InfoTable       

This is the error message received

3 REPLIES 3
supandey
19-Tanzanite
(To:psaxena)

Hi Priyanshi, are you renaming the variable which hold the final result? Secondly, is this part of a service which you are writing? If yes, please make sure you save the entity before testing the service.

no the entity with final result is with name result only and I have also saved the service before testing the service

supandey
19-Tanzanite
(To:psaxena)

Priyanshi, going by the heading of this topic you wish to convert the JSON to Infotable for this I think you better off using FromJSON() and not GetJSON() since getJSON() is simply extracting the JSON information and not converting it to Infotable.

Just an additional info if you wish to convert Infotable into JSON use ToJSON()

Hope this helps.

Top Tags