#java libary for pretty printing jsons

1 messages · Page 1 of 1 (latest)

timber bane
#

Is there a libary for java, which allows pretty printing of even malformed JSONS. Does anyone know of something like this or do I have to write my own pretty printer for this case?

open oceanBOT
#

<@&987246964494204979> please have a look, thanks.

open oceanBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

mental gust
#

oooh even malformed ones?

#

well there are tolerant parsers and whatnot

#

but for just pretty printing you kinda only need to count { and [ and "

#

1 sec

#

hmm yeah can't find anything

#

you would probably have to make something yourself or dig deeper into "tolerant parsers" in some way

#

its kinda easy to do if we forget about escaped chars in strings

#

but thats when it gets annoying

#

i mean, just like any parser

timber bane
#

Thanks @mental gust