@Test public void should_Return_CurrentPath_InParts_For_Parser() throws IOException { assertThat(underTest.currentPathInParts().length, equalTo(0)); underTest.nextValue(); assertThat(underTest.currentPathInParts().length, equalTo(0)); underTest.nextValue(); assertThat(underTest.currentPathInParts().length, equalTo(1)); assertThat(underTest.currentPathInParts()[0], equalTo("_id")); underTest.nextValue(); assertThat(underTest.currentPathInParts().length, equalTo(1)); assertThat(underTest.currentPathInParts()[0], equalTo("user")); underTest.nextValue(); assertThat(underTest.currentPathInParts().length, equalTo(2)); assertThat(underTest.currentPathInParts()[0], equalTo("user")); assertThat(underTest.currentPathInParts()[1], equalTo("description")); underTest.nextValue(); assertThat(underTest.currentPathInParts().length, equalTo(1)); assertThat(underTest.currentPathInParts()[0], equalTo("user")); underTest.nextValue(); assertThat(underTest.currentPathInParts().length, equalTo(0)); }
public String[] currentPathInParts() { String currentPath = currentPath().substring(1); return isBlank(currentPath) ? EMPTY_STRING_ARRAY : currentPath.split(JSON_PATH_SEPARATOR); }
CurrentPathJsonParser extends JsonParserDecorator { public String[] currentPathInParts() { String currentPath = currentPath().substring(1); return isBlank(currentPath) ? EMPTY_STRING_ARRAY : currentPath.split(JSON_PATH_SEPARATOR); } }
CurrentPathJsonParser extends JsonParserDecorator { public String[] currentPathInParts() { String currentPath = currentPath().substring(1); return isBlank(currentPath) ? EMPTY_STRING_ARRAY : currentPath.split(JSON_PATH_SEPARATOR); } CurrentPathJsonParser(final JsonParser jsonParser); }
CurrentPathJsonParser extends JsonParserDecorator { public String[] currentPathInParts() { String currentPath = currentPath().substring(1); return isBlank(currentPath) ? EMPTY_STRING_ARRAY : currentPath.split(JSON_PATH_SEPARATOR); } CurrentPathJsonParser(final JsonParser jsonParser); String currentPath(); String[] currentPathInParts(); JsonPointer currentPointer(); }
CurrentPathJsonParser extends JsonParserDecorator { public String[] currentPathInParts() { String currentPath = currentPath().substring(1); return isBlank(currentPath) ? EMPTY_STRING_ARRAY : currentPath.split(JSON_PATH_SEPARATOR); } CurrentPathJsonParser(final JsonParser jsonParser); String currentPath(); String[] currentPathInParts(); JsonPointer currentPointer();  }