Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any way to globally output 'pretty' JSON? #451

Open
aximuseng opened this issue Dec 27, 2019 · 1 comment
Open

Any way to globally output 'pretty' JSON? #451

aximuseng opened this issue Dec 27, 2019 · 1 comment

Comments

@aximuseng
Copy link

aximuseng commented Dec 27, 2019

Looking to output human readable JSON like this:

https://stackoverflow.com/questions/86653/how-can-i-pretty-format-my-json-output-in-ruby-on-rails

Tried this approach but I get 'only generation of JSON objects or arrays allowed'.

@aximuseng aximuseng changed the title pretty Any way to globally output 'pretty' JSON? Dec 27, 2019
@aximuseng aximuseng reopened this Dec 27, 2019
@stas
Copy link
Contributor

stas commented Jan 7, 2020

@aximuseng starting with the next release, JSON serialization will no longer be handled by the library.

Consider this PR for more details, you can use the example to achieve the same even with the current version though:
https://github.com/fast-jsonapi/fast_jsonapi/pull/44/files

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

No branches or pull requests

2 participants