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

TokenBuffer support for setting streamWriteConstraints #4018

Closed
pjfanning opened this issue Jul 8, 2023 · 6 comments
Closed

TokenBuffer support for setting streamWriteConstraints #4018

pjfanning opened this issue Jul 8, 2023 · 6 comments
Labels
2.16 Issues planned for 2.16

Comments

@pjfanning
Copy link
Member

The TokenBuffer will inherit the default StreamWriteConstraints. We'll need a way to allow users who want to support deeply nested data to have TokenBuffer run with a custom StreamWriteConstraints.

Relates to FasterXML/jackson-core#1055

@pjfanning pjfanning added the to-evaluate Issue that has been received but not yet evaluated label Jul 8, 2023
@cowtowncoder
Copy link
Member

Possibly. If I remember correctly, there are methods in SerializerProvider to be used for constructing instances, instead of direct construction -- if so, there'd be access to underlying JsonFactory which should give access I think.
Ability to override this setting would be useful as well. Same holds true for StreamReadConstraints if not already handled.

@cowtowncoder cowtowncoder added 2.16 Issues planned for 2.16 and removed to-evaluate Issue that has been received but not yet evaluated labels Jul 11, 2023
@pjfanning
Copy link
Member Author

The StreamReadConstaints come from the JsonParser instances that are passed to the TokenBuffer. The StreamWriteConstaints could come from the JsonGenerator instances.

@cowtowncoder
Copy link
Member

@pjfanning Yes, definitely in cases where JsonGenerator is passed (or can be passed)

@cowtowncoder
Copy link
Member

@pjfanning Is this still needed?

@pjfanning
Copy link
Member Author

Maybe best to wait for a real world issue instead of trying to be proactive on this.

@cowtowncoder
Copy link
Member

Ok, will close; easy enough to re-open if/when requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.16 Issues planned for 2.16
Projects
None yet
Development

No branches or pull requests

2 participants