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

Auutomatically stop parsing if JSON stanzais complete #66

Open
GoogleCodeExporter opened this issue Dec 24, 2015 · 1 comment
Open

Auutomatically stop parsing if JSON stanzais complete #66

GoogleCodeExporter opened this issue Dec 24, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

I'm using json-simple to read JSON stanzas directly from a Reader which in turn 
comes from a TCP-Socket. While implementing this, I stumbled over a behavior in 
JSONParser. Parse.parse does not return if the stanza is complete, but wait for 
a EOF. I extended   public Object parse(Reader in, ContainerFactory 
containerFactory) throws IOException, ParseException by adding

                if(status==S_IN_FINISHED_VALUE) {
                    System.out.println("fertig?");
                    return valueStack.removeFirst();
                }

on line 259 (just before the closing while)

I'm using version 1.1, because I didn't find the sources for 1.1.1.

Original issue reported on code.google.com by [email protected] on 28 Feb 2012 at 8:14

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 28 Mar 2012 at 2:49

  • Changed state: Accepted
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

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

No branches or pull requests

1 participant