Netflix / fast_jsonapi

No Longer Maintained - A lightning fast JSON:API serializer for Ruby Objects.
Apache License 2.0
5.07k stars 425 forks source link

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

Open aximuseng opened 4 years ago

aximuseng commented 4 years ago

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'.

stas commented 4 years ago

@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