Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

json-pretty-print-buffer works,but... #97

Closed
motuwe opened this issue Sep 15, 2015 · 2 comments
Closed

json-pretty-print-buffer works,but... #97

motuwe opened this issue Sep 15, 2015 · 2 comments

Comments

@motuwe
Copy link

motuwe commented Sep 15, 2015

Hi,all:)
this is my init-restclient config file.

;;; init-restclient --- HTTP REST client tool for emacs
;;; Commentary:
;;; Code:
(require-package 'restclient)
(require 'restclient)

(add-to-list 'auto-mode-alist '("\\.restclient$" . restclient-mode))
(setq restclient-same-buffer-response-name "*RESTClient*")

(add-hook 'restclient-response-loaded-hook
      (lambda ()
        (let ((json-special-chars (remq (assoc ?/ json-special-chars) json-special-chars)))
              (ignore-errors (json-pretty-print-buffer)))
        (restclient-prettify-json-unicode)))

(provide 'init-restclient)

;;; init-restclient ends here

When the response returns json data,The data seems reversed.

For example:

{"a":1,"b":2} => {"b":2,"a":1}

Please fix it:)

Thanks a lot!

@pashky
Copy link
Owner

pashky commented Sep 15, 2015

This is how json-pretty-print-buffer works. Please report this to GNU Emacs bug tracker, as json.el is part of GNU Emacs.

@pashky pashky closed this as completed Sep 15, 2015
@simenheg
Copy link

simenheg commented Oct 4, 2015

This should now have been fixed in json.el.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants