throws IOException, JsonReadException
{
JsonLocation arrayStart = JsonReader.expectArrayStart(parser);
if (JsonReader.isArrayEnd(parser)) {
throw new JsonReadException("expecting a two-element array of [path, metadata], found a zero-element array", arrayStart);
}
String lcPath;
try {
lcPath = JsonReader.StringReader.read(parser);
}
catch (JsonReadException ex) {
throw ex.addArrayContext(0);
}
if (JsonReader.isArrayEnd(parser)) {
throw new JsonReadException("expecting a two-element array of [path, metadata], found a one-element array: " + jq(lcPath), arrayStart);
}
/*@Nullable*/MD metadata;
try {
metadata = metadataReader.readOptional(parser);
}
catch (JsonReadException ex) {
throw ex.addArrayContext(1);
}
if (!JsonReader.isArrayEnd(parser)) {
throw new JsonReadException("expecting a two-element array of [path, metadata], found non \"]\" token after the two elements: " + parser.getCurrentToken(), arrayStart);
}
parser.nextToken();
return new Entry<MD>(lcPath, metadata);