Foundation 5, `tojson` method