bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21488: json-pretty-print-buffer works,but...


From: Stefan Monnier
Subject: bug#21488: json-pretty-print-buffer works,but...
Date: Sat, 03 Oct 2015 13:54:55 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> JSON objects are by definition unordered, but I agree that it would be
> nicer if the prettification functions maintained the ordering by
> default.

Agreed.

> @@ -400,7 +401,9 @@ Please see the documentation of `json-object-type' and 
> `json-key-type'."
>            (signal 'json-object-format (list "," (json-peek))))))
>      ;; Skip over the "}"
>      (json-advance)
> -    elements))
> +    (if (eq json-object-type 'alist)
> +        (nreverse elements)
> +      elements)))

Don't we also need to reverse (tho differently) if json-object-type
is `plist'?


        Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]