reader.close();
}
@Test
public void testReadString() throws IOException {
JsonReader reader = new JsonStringReader(" { \"testField\": \"ddsfseee\", \"testField2\": \"dddfd\"}");
Assert.assertThat(reader.isObject(), is(true));
char[] t1 = "dsffsfsf".toCharArray();
char[] ret = reader.readField(t1);
Assert.assertThat(new String(ret), is("testField"));
Assert.assertThat(reader.isColon(), is(true));
Assert.assertThat(reader.readString(), is("ddsfseee"));
char ch = reader.readAndSkipBlank();
Assert.assertThat(ch, is(','));
ret = reader.readField(t1);
Assert.assertThat(new String(ret), is("testField2"));
Assert.assertThat(reader.isColon(), is(true));
Assert.assertThat(reader.readString(), is("dddfd"));
ch = reader.readAndSkipBlank();
Assert.assertThat(ch, is('}'));
reader.close();
}