Skip to content

Commit 00dbf0d

Browse files
committed
Tweak javadoc, build.yml to use 17
1 parent 88a53d1 commit 00dbf0d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
java_version: [11,17]
15+
java_version: [17]
1616
os: [ubuntu-latest]
1717

1818
steps:

jsonb/src/main/java/io/avaje/jsonb/Jsonb.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,15 @@ static Builder newBuilder() {
185185
* <h3>toJson() example</h3>
186186
* <pre>{@code
187187
*
188+
* Object anything = ...
189+
* String jsonContent = jsonb.toJson(anything);
190+
*
188191
* Customer customer = ...
189192
*
193+
* // any type toJson()
194+
* String jsonContent = jsonb.toJson(customer);
195+
*
196+
* // or use .type(Customer.class) if we like
190197
* String jsonContent = jsonb
191198
* .type(Customer.class)
192199
* .toJson(customer);
@@ -208,7 +215,7 @@ static Builder newBuilder() {
208215
* .type(Object.class)
209216
* .toJson(any);
210217
*
211-
* // the same as
218+
* // which is the same as
212219
* String jsonContent = jsonb.toJson(any);
213220
*
214221
* }</pre>

0 commit comments

Comments
 (0)