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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Infotable to JSON failing to convert

agondek
11-Garnet

Infotable to JSON failing to convert

Both 

Resources["InfoTableFunctions"].ToJSON(params);

and

.ToJSON();

are failing to convert my infotable to a JSON object. Does anyone know why this could potentially happen? I understand that the .ToJSON() method does not work with infotables that are already JSON objects but does the same apply for the first option?

3 REPLIES 3
AdamR
12-Amethyst
(To:agondek)

The first method will only work with an infotable type passed into the parameters.

 

What is the result of this call?  Is it giving you an error or just producing an unexpected output?

agondek
11-Garnet
(To:AdamR)

Hey Adam,

 

Yes, I do pass an infotable into the params. The result is unexpected, both the first and the second method return an infotable instead of a json object. No errors encountered.

 

Thanks

I'm broadly using infotable.ToJSON() method without issues, which it's the issue with it?

For instance I've use it to print contents of Infotable on the log (for debugging purposes) doing something like:

 

logger.info("Log Message Of Infotable: "+infotable.ToJSON());

 

Regards,

Carles

Top Tags