XML/JSON serialiser

You can set the default serialization to json. Have a look at this thread: Use json for non-serializable results