Interface for objects that implement pretty printer functionality, such as indentation. Pretty printers are used to add white space in output JSON content, to make results more human readable. Usually this means things like adding linefeeds and indentation.
| 10 | * linefeeds and indentation. |
| 11 | */ |
| 12 | public interface PrettyPrinter |
| 13 | { |
| 14 | /* |
| 15 | ////////////////////////////////////////////////////// |
| 16 | // First methods that act both as events, and expect |
| 17 | // output for correct functioning (i.e something gets |
| 18 | // output even when not pretty-printing) |
| 19 | ////////////////////////////////////////////////////// |
| 20 | */ |
| 21 | |
| 22 | // // // Root-level handling: |
| 23 | |
| 24 | /** |
| 25 | * Method called after a root-level value has been completely |
| 26 | * output, and before another value is to be output. |
| 27 | *<p> |
| 28 | * Default |
| 29 | * handling (without pretty-printing) will output a space, to |
| 30 | * allow values to be parsed correctly. Pretty-printer is |
| 31 | * to output some other suitable and nice-looking separator |
| 32 | * (tab(s), space(s), linefeed(s) or any combination thereof). |
| 33 | * @param jg Undocumented. |
| 34 | * @throws java.io.IOException Undocumented. |
| 35 | * @throws org.codehaus.jackson.JsonGenerationException Undocumented. |
| 36 | */ |
| 37 | public void writeRootValueSeparator(JsonGenerator jg) |
| 38 | throws IOException, JsonGenerationException; |
| 39 | |
| 40 | // // Object handling |
| 41 | |
| 42 | /** |
| 43 | * Method called when an Object value is to be output, before |
| 44 | * any fields are output. |
| 45 | *<p> |
| 46 | * Default handling (without pretty-printing) will output |
| 47 | * the opening curly bracket. |
| 48 | * Pretty-printer is |
| 49 | * to output a curly bracket as well, but can surround that |
| 50 | * with other (white-space) decoration. |
| 51 | * @param jg Undocumented. |
| 52 | * @throws java.io.IOException Undocumented. |
| 53 | * @throws org.codehaus.jackson.JsonGenerationException Undocumented. |
| 54 | */ |
| 55 | public void writeStartObject(JsonGenerator jg) |
| 56 | throws IOException, JsonGenerationException; |
| 57 | |
| 58 | /** |
| 59 | * Method called after an Object value has been completely output |
| 60 | * (minus closing curly bracket). |
| 61 | *<p> |
| 62 | * Default handling (without pretty-printing) will output |
| 63 | * the closing curly bracket. |
| 64 | * Pretty-printer is |
| 65 | * to output a curly bracket as well, but can surround that |
| 66 | * with other (white-space) decoration. |
| 67 | * |
| 68 | * @param jg Undocumented. |
| 69 | * @param nrOfEntries Number of direct members of the array that |
no outgoing calls
no test coverage detected