How to properly use event.jsonValue?

(Michael Lasevich) #1

I am trying to debug some events and tried printing the jsonValue of event and get this:

groovy.json.JsonException: Lexing failed on line: 1, column: 1, while reading 'o', no possible valid JSON value or punctuation could be recognized

There is a very old (over a year) post about this with no solutions

I did attempt using event.encodeAsJSON() instead and get this instead:

 org.apache.commons.lang.UnhandledException: org.codehaus.groovy.grails.web.converters.exceptions.ConverterException: Error converting Bean with class physicalgraph.device.cache.InstalledSmartAppDTO 

Reference lists type of jsonValue as “Object” which is really suspicious