changeset 37992:a25513263075

templatefilters: document the json filter I don't know the exact reason why it was undocumented, but that would be because unicode is difficult for humans. Since the json filter can now get localstr back to UTF-8 as long as it is unprocessed (i.e. {desc|json} works, but {desc|firstline|json} doesn't), it seems good enough to advertise the json filter.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 16 Jan 2016 19:23:53 +0900
parents 3ea3c96ada54
children 1129e444fd6c
files mercurial/templatefilters.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/templatefilters.py	Sun Apr 23 13:15:30 2017 +0900
+++ b/mercurial/templatefilters.py	Sat Jan 16 19:23:53 2016 +0900
@@ -238,6 +238,7 @@
 
 @templatefilter('json')
 def json(obj, paranoid=True):
+    """Any object. Serializes the object to a JSON formatted text."""
     if obj is None:
         return 'null'
     elif obj is False: