GNU bug report logs -
#12634
24.2; [FEATURE REQUEST] JSON pretty printer
Previous Next
Reported by: Leo <sdl.web <at> gmail.com>
Date: Sat, 13 Oct 2012 08:41:01 UTC
Severity: wishlist
Found in version 24.2
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Cool, new patch attached. I've consolidated current-separator into
current-indentation and created a little private helper function
`json--current-whitespace' for the newline/indentation.
I've also created a var called `json-encoding-lisp-style-closings' per your
request. :-)
Just let me know if there's anything else.
Thanks,
-Ryan
On Thu, Oct 25, 2012 at 2:08 PM, Stefan Monnier <monnier <at> iro.umontreal.ca>wrote:
> It looks OK overall, but I do have some comments:
> - it would be better not to re-compute json-encoding-current-separator
> every time we call json-encode, since that function is called all
> the time.
> IOW, build it once in an external caller. Or better yet: get rid of
> json-encoding-current-separator and add a "\n" at the beginning of
> json-encoding-current-indentation instead.
> - you can use the "json--" prefix to indicate it is an internal
> variable/function.
> - You could also prefer to place the closing ] at the end of the
> previous line, à la Lisp ;-)
>
>
> Stefan
>
[Message part 2 (text/html, inline)]
[json-pretty-printing (application/octet-stream, attachment)]
This bug report was last modified 12 years and 219 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.