@Test public void testMetadata() throws IOException { String src = "{\"@class\" : \"theclass\"" + ", \"@author\":\"me\"" + ", \"@comment\":\"no comment\"" + ", \"obj\" : " + " {\"@class\":\"anotherclass\"}}"; JsonReader reader = new JsonReader(new StringReader(src), false, true); assertTrue(reader.beginObject().hasNext()); assertEquals("theclass", reader.metadata("class")); assertEquals("me", reader.metadata("author")); assertEquals("no comment", reader.metadata("comment")); reader.next(); reader.beginObject(); assertNull(reader.metadata("author")); assertEquals("anotherclass", reader.metadata("class")); assertFalse(reader.hasNext()); reader.endObject().endObject(); reader.close(); }
public String metadata(String name) { if (!_metadata_readen) nextObjectMetadata(); return _metadata.get(name); }
JsonReader implements ObjectReader { public String metadata(String name) { if (!_metadata_readen) nextObjectMetadata(); return _metadata.get(name); } }
JsonReader implements ObjectReader { public String metadata(String name) { if (!_metadata_readen) nextObjectMetadata(); return _metadata.get(name); } JsonReader(String source);  JsonReader(Reader reader, boolean strictDoubleParse, boolean readMetadata); }
JsonReader implements ObjectReader { public String metadata(String name) { if (!_metadata_readen) nextObjectMetadata(); return _metadata.get(name); } JsonReader(String source);  JsonReader(Reader reader, boolean strictDoubleParse, boolean readMetadata); void close(); ObjectReader beginArray(); ObjectReader beginObject(); ObjectReader nextObjectMetadata(); ObjectReader endArray(); ObjectReader endObject(); String name(); String valueAsString(); int valueAsInt(); long valueAsLong(); double valueAsDouble(); short valueAsShort(); float valueAsFloat(); boolean valueAsBoolean(); byte[] valueAsByteArray(); String metadata(String name); ValueType getValueType(); ObjectReader skipValue(); boolean hasNext(); ValueType next(); @Override JsonType enclosingType(); int column(); int row(); }
JsonReader implements ObjectReader { public String metadata(String name) { if (!_metadata_readen) nextObjectMetadata(); return _metadata.get(name); } JsonReader(String source);  JsonReader(Reader reader, boolean strictDoubleParse, boolean readMetadata); void close(); ObjectReader beginArray(); ObjectReader beginObject(); ObjectReader nextObjectMetadata(); ObjectReader endArray(); ObjectReader endObject(); String name(); String valueAsString(); int valueAsInt(); long valueAsLong(); double valueAsDouble(); short valueAsShort(); float valueAsFloat(); boolean valueAsBoolean(); byte[] valueAsByteArray(); String metadata(String name); ValueType getValueType(); ObjectReader skipValue(); boolean hasNext(); ValueType next(); @Override JsonType enclosingType(); int column(); int row();  }