@Test public void feedWithInlineCountAndNextAndDelta() throws Exception { EdmEntitySet entitySet = MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Teams"); String content = "{\"d\":{\"__count\":\"3\",\"results\":[{" + "\"__metadata\":{\"id\":\"http: "\"uri\":\"http: "\"Id\":\"1\",\"Name\":\"Team 1\",\"isScrumTeam\":false,\"nt_Employees\":{\"__deferred\":{" + "\"uri\":\"http: "\"__next\":\"Rooms?$skiptoken=98&$inlinecount=allpages\",\"__delta\":\"deltalink\"}}"; assertNotNull(content); InputStream contentBody = createContentAsStream(content); EntityStream entityStream = new EntityStream(); entityStream.setContent(contentBody); entityStream.setReadProperties(DEFAULT_PROPERTIES); JsonEntityDeserializer xec = new JsonEntityDeserializer(); ODataFeed feed = xec.readFeed(entitySet, entityStream); assertNotNull(feed); List<ODataEntry> entries = feed.getEntries(); assertNotNull(entries); assertEquals(1, entries.size()); FeedMetadata feedMetadata = feed.getFeedMetadata(); assertNotNull(feedMetadata); assertEquals(Integer.valueOf(3), feedMetadata.getInlineCount()); assertEquals("Rooms?$skiptoken=98&$inlinecount=allpages", feedMetadata.getNextLink()); assertEquals("deltalink", feedMetadata.getDeltaLink()); }
private void readFeed() throws IOException, EdmException, EntityProviderException { JsonToken peek = reader.peek(); if (peek == JsonToken.BEGIN_ARRAY) { readArrayContent(); } else { reader.beginObject(); final String nextName = reader.nextName(); if (FormatJson.D.equals(nextName)) { if (reader.peek() == JsonToken.BEGIN_ARRAY) { readArrayContent(); } else { reader.beginObject(); readFeedContent(); reader.endObject(); } } else { handleName(nextName); readFeedContent(); } reader.endObject(); } }
JsonFeedDeserializer { private void readFeed() throws IOException, EdmException, EntityProviderException { JsonToken peek = reader.peek(); if (peek == JsonToken.BEGIN_ARRAY) { readArrayContent(); } else { reader.beginObject(); final String nextName = reader.nextName(); if (FormatJson.D.equals(nextName)) { if (reader.peek() == JsonToken.BEGIN_ARRAY) { readArrayContent(); } else { reader.beginObject(); readFeedContent(); reader.endObject(); } } else { handleName(nextName); readFeedContent(); } reader.endObject(); } } }
JsonFeedDeserializer { private void readFeed() throws IOException, EdmException, EntityProviderException { JsonToken peek = reader.peek(); if (peek == JsonToken.BEGIN_ARRAY) { readArrayContent(); } else { reader.beginObject(); final String nextName = reader.nextName(); if (FormatJson.D.equals(nextName)) { if (reader.peek() == JsonToken.BEGIN_ARRAY) { readArrayContent(); } else { reader.beginObject(); readFeedContent(); reader.endObject(); } } else { handleName(nextName); readFeedContent(); } reader.endObject(); } } JsonFeedDeserializer(final JsonReader reader, final EntityInfoAggregator eia,
      final DeserializerProperties readProperties); }
JsonFeedDeserializer { private void readFeed() throws IOException, EdmException, EntityProviderException { JsonToken peek = reader.peek(); if (peek == JsonToken.BEGIN_ARRAY) { readArrayContent(); } else { reader.beginObject(); final String nextName = reader.nextName(); if (FormatJson.D.equals(nextName)) { if (reader.peek() == JsonToken.BEGIN_ARRAY) { readArrayContent(); } else { reader.beginObject(); readFeedContent(); reader.endObject(); } } else { handleName(nextName); readFeedContent(); } reader.endObject(); } } JsonFeedDeserializer(final JsonReader reader, final EntityInfoAggregator eia,
      final DeserializerProperties readProperties); ODataDeltaFeed readFeedStandalone(); }
JsonFeedDeserializer { private void readFeed() throws IOException, EdmException, EntityProviderException { JsonToken peek = reader.peek(); if (peek == JsonToken.BEGIN_ARRAY) { readArrayContent(); } else { reader.beginObject(); final String nextName = reader.nextName(); if (FormatJson.D.equals(nextName)) { if (reader.peek() == JsonToken.BEGIN_ARRAY) { readArrayContent(); } else { reader.beginObject(); readFeedContent(); reader.endObject(); } } else { handleName(nextName); readFeedContent(); } reader.endObject(); } } JsonFeedDeserializer(final JsonReader reader, final EntityInfoAggregator eia,
      final DeserializerProperties readProperties); ODataDeltaFeed readFeedStandalone();  }