Added to_json for all templates