default method is set for json dumping (the `tojson` filter), if the object has a `json` attribute, it will be called, otherwise it is replaced by None, this avoids crash when rendering the template.