Add a JSON string template filter

Benjamin Smedberg benjamin at smedbergs.us
Wed Mar 19 20:53:54 UTC 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm working on an hgweb template that will print results in JSON, for
manipulation via an AJAX frontend that lets users browse the repository
online (an SVG version of `hg view`, basically).

I have a patch attached which adds a "jsonescape" template filter which is
necessary to get correct JSON output. The logic is taken from the simplejson
module, and I've copied the license header from that module, which I believe
is a compatible license to the mercurial code.

- --BDS

- --

Benjamin Smedberg
Platform Guru
Mozilla Corporation
benjamin at smedbergs.us
http://benjamin.smedbergs.us/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH4X1hSSwGp5sTYNkRAsYyAKCJVEI3Y2rM+K9TriPKCKKW1cZGjgCghl6X
7GdDtrzZvHeP3oPQ0CpY+Ws=
=hFL8
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: jsonescape.patch
Url: http://selenic.com/pipermail/mercurial-devel/attachments/20080319/b8baf2b4/attachment.txt 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jsonescape.patch.sig
Type: application/octet-stream
Size: 65 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20080319/b8baf2b4/attachment.obj 


More information about the Mercurial-devel mailing list