We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
the following test fails
public void test_Iteration() { Any o1 = JsonIterator.deserialize("{\"prop\":\"asd\",\"prop2\":123}"); assertThat(o1, is(not(nullValue()))); int entryCounter = 0; for(Any obj : o1) { entryCounter++; } assertThat(entryCounter, is(equalTo(2))); }
The text was updated successfully, but these errors were encountered:
I have realized that o1.iterator() is not meaningful given that o1 is a JSON Object (and not an array, for example). The proper way to iterate is:
public void test_Iteration() { Any o1 = JsonIterator.deserialize("{\"prop\":\"asd\",\"prop2\":123}"); assertThat(o1, is(not(nullValue()))); int entryCounter = 0; Any.EntryIterator iter = o1.entries(); while (iter.next()) { entryCounter++; } assertThat(entryCounter, is(equalTo(2))); }
Sorry, something went wrong.
No branches or pull requests
the following test fails
The text was updated successfully, but these errors were encountered: