Skip to content

Commit 0a48eaf

Browse files
committed
More json
1 parent 1bc1fad commit 0a48eaf

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • stubbornjava-common/src/main/java/com/stubbornjava/common

‎stubbornjava-common/src/main/java/com/stubbornjava/common/Json.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,15 @@ public String toString(Object obj) {
129129
}
130130
// {{end:writeJson}}
131131

132+
// {{start:toPrettyString}}
132133
public String toPrettyString(Object obj) {
133134
try {
134135
return prettyWriter.writeValueAsString(obj);
135136
} catch (IOException e) {
136137
throw new JsonException(e);
137138
}
138139
}
140+
// {{end:toPrettyString}}
139141

140142
// {{start:toByteArray}}
141143
public byte[] toByteArray(Object obj) {

0 commit comments

Comments
 (0)