-
-
Notifications
You must be signed in to change notification settings - Fork 795
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 'JsonGenerator.writeString(Reader r, int charLength)' #17
Comments
Thank you for contributing this! I hope to look into it soon, but at this point I have bit of a backlog with issues so it may take couple of days. But I wanted to add a note to know I am aware of this PR. |
Another quick note: I plan on merging this after |
I have an idea for a fix at https://github.com/uhhhh2/jackson-core . How does it look so far? Where would be a good place to create a unit test? |
@uhhhh2 Please create a PR if you have a solution that you think works. |
Alternate approach for issue #17
Merged, to be included in 2.9.0. @uhhhh2 Thank you contributing this! |
…impl, causes unnecessary compatibility issues
Current 'writeString()' method requires text value to be passed in its entirety. This may not work well with larger payloads; so we should an alternative method where one can define source for text, used for incremental/streaming read+write.
In addition to Reader, it should be possible to indicate exact number of bytes to include; this because some formats (not JSON however!) require such information to be written before data, or used for initializing write. It should be possible to pass marker value -1 to indicate "not known": not all generators are required to support it, however.
If length is indicated, it is an error for Reader to provide less data (more is ok; generator just will not read anything beyond indicated amount).
The text was updated successfully, but these errors were encountered: