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

issue #15 - readtext in jsonparser #285

Merged
merged 1 commit into from May 18, 2016

Conversation

LokeshN
Copy link
Contributor

@LokeshN LokeshN commented May 18, 2016

I have implemented the readText(writer) which reads the character segments and writes to the given writer object.
Fixed the review comments from previous PR.
I have changed the api now for readText(Writer) to return the number of bytes read instead of true and false as we are reading all the contents at once.
Let me know if this is fine.

else if(t != null) {
switch (t.id()) {
case ID_FIELD_NAME:
writer.write(_parsingContext.getCurrentName());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These cases also need to indicate amount of content written (len)

@cowtowncoder
Copy link
Member

Looks good; I can add len handling as per comments.

@cowtowncoder cowtowncoder merged commit 7a0991a into FasterXML:master May 18, 2016
@cowtowncoder
Copy link
Member

Actually I'll go ahead and rename this method as getText() to be bit more consistent with existing API: it's more of an overload than related to other readXxx() method; latter are related to callbacks to object binder (readValueAs()).

Also I need to add default impl as well as efficient definitions for all other data formats: this is why default implementation is important (instead of new abstract method), so as not to break many existing dataformat modules.

Thank you again for contributing this!

cowtowncoder added a commit that referenced this pull request May 18, 2016
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

Successfully merging this pull request may close these issues.

None yet

2 participants