@Test public void testReadObjectWithoutClass() throws IOException, ClassNotFoundException { fastJsonObjectInput = new FastJsonObjectInput(new StringReader("{ \"name\":\"John\", \"age\":30 }")); JSONObject readObject = (JSONObject) fastJsonObjectInput.readObject(); assertThat(readObject, not(nullValue())); assertThat(readObject.getString("name"), is("John")); assertThat(readObject.getInteger("age"), is(30)); }
@Override public Object readObject() throws IOException, ClassNotFoundException { String json = readLine(); return JSON.parse(json); }
FastJsonObjectInput implements ObjectInput { @Override public Object readObject() throws IOException, ClassNotFoundException { String json = readLine(); return JSON.parse(json); } }
FastJsonObjectInput implements ObjectInput { @Override public Object readObject() throws IOException, ClassNotFoundException { String json = readLine(); return JSON.parse(json); } FastJsonObjectInput(InputStream in);  FastJsonObjectInput(Reader reader); }
FastJsonObjectInput implements ObjectInput { @Override public Object readObject() throws IOException, ClassNotFoundException { String json = readLine(); return JSON.parse(json); } FastJsonObjectInput(InputStream in);  FastJsonObjectInput(Reader reader); @Override boolean readBool(); @Override byte readByte(); @Override short readShort(); @Override int readInt(); @Override long readLong(); @Override float readFloat(); @Override double readDouble(); @Override String readUTF(); @Override byte[] readBytes(); @Override Object readObject(); @Override T readObject(Class<T> cls); @Override @SuppressWarnings("unchecked") T readObject(Class<T> cls, Type type); }
FastJsonObjectInput implements ObjectInput { @Override public Object readObject() throws IOException, ClassNotFoundException { String json = readLine(); return JSON.parse(json); } FastJsonObjectInput(InputStream in);  FastJsonObjectInput(Reader reader); @Override boolean readBool(); @Override byte readByte(); @Override short readShort(); @Override int readInt(); @Override long readLong(); @Override float readFloat(); @Override double readDouble(); @Override String readUTF(); @Override byte[] readBytes(); @Override Object readObject(); @Override T readObject(Class<T> cls); @Override @SuppressWarnings("unchecked") T readObject(Class<T> cls, Type type);  }