Serialize Location object?

smartapp

(Moiz Hayder) #1

I want to list all the properties of Location object along-with their values. Any idea how to do that ? Can we serialize location object to JSON ?


(Chris) #2

Depends if you just want to spit it into the log, single log messages get truncated.

If you just want to see what properties are available you can do:

location.properties.each {
     log.debug it
}