fast_jsonapi icon indicating copy to clipboard operation
fast_jsonapi copied to clipboard

Any way to globally output 'pretty' JSON?

Open aximuseng opened this issue 6 years ago • 1 comments

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 avatar Dec 27 '19 16:12 aximuseng

@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

stas avatar Jan 07 '20 20:01 stas