Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ObjectMapper.createParser() and createGenerator() methods #2647

Closed
cowtowncoder opened this issue Mar 8, 2020 · 0 comments
Closed

Add ObjectMapper.createParser() and createGenerator() methods #2647

cowtowncoder opened this issue Mar 8, 2020 · 0 comments
Milestone

Comments

@cowtowncoder
Copy link
Member

Jackson 3.x will have direct JsonParser and JsonGenerator construction methods in ObjectMapper (and ObjectReader, ObjectWriter), as they are needed due to closer interaction between mapper and parser/generator.
But even in 2.x pattern of

JsonParser p = mapper.getFactory().createParser(....)

is quite common (ditto for generator). So it would probably make sense to add these methods both for convenience, and to offer upgrade path for code for eventual 2.x -> 3.0 migration, where direct access to JsonFactory, then calling on creation methods will not work as well (since it will not link read/write contexts properly).

cowtowncoder added a commit that referenced this issue Mar 8, 2020
@cowtowncoder cowtowncoder changed the title Add ObjectMapper.createParser() and createGenerator methods in 2.x Add ObjectMapper.createParser() and createGenerator() methods Mar 8, 2020
@cowtowncoder cowtowncoder added this to the 2.11.0 milestone Mar 8, 2020
@cowtowncoder cowtowncoder removed the 2.11 label Apr 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant