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

Infotable to JSON failing to convert

Highlighted
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?

Tags (2)
3 REPLIES 3

Re: Infotable to JSON failing to convert

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?

Re: Infotable to JSON failing to convert

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

Re: Infotable to JSON failing to convert

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