Skip to content

Commit

Permalink
doc(README.md): fix wrong variable declared (#4732)
Browse files Browse the repository at this point in the history
  • Loading branch information
dancer1325 authored Oct 3, 2024
1 parent 1ad5ea8 commit cca7f9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ ObjectMapper mapper = ...;
File jsonFile = new File("test.json");
// note: method added in Jackson 2.11 (earlier would need to use
// mapper.getFactory().createGenerator(...)
JsonGenerator g = f.createGenerator(jsonFile, JsonEncoding.UTF8);
JsonGenerator g = mapper.createGenerator(jsonFile, JsonEncoding.UTF8);
// write JSON: { "message" : "Hello world!" }
g.writeStartObject();
g.writeStringField("message", "Hello world!");
Expand Down

0 comments on commit cca7f9b

Please sign in to comment.