If you’ve been following my series on using the GlassFish REST interface, you’ve probably noticed that your JSON and XML output isn’t pretty-printed like mine. While there are several onlinetools that can fix that for you, there’s no need for the extra step. GlassFish will do that for you. Let’s look at how to make that happen.
debug - To the best of my knowledge, this option is not used.
indentLevel - If this option is 0 or greater, the output is pretty-printed, using this value as the indentation level.
logInput - Echo to the server log all REST requests.
logOutput - Echo to the server log all REST responses.
showDeprecatedItems - By default, deprecated items are not shown. If you need to see them, set this to true.
showHiddenCommands - By default, hidden commands are not shown. If you need to see them, set this to true. Be warned, though, that hidden commands are hidden for a reason. They are internal, undocumented commands and can be changed or removed without notice.
wadlGeneration - Since WADL generation is an expensive process, it is turned off by default. If you need WADL, set this to true. You can then retrieve the WADL document from http://localhost:4848/management/application.wadl. Be careful with that, the resulting file is HUGE.