A new method as_json() has been added.