title: Navigation links are not returned when using JSON for OData (using Apache Olingo for Java)
body: <p>when using the below code using XML it works perfectly, that is, the navigation links are returned successfully.  However, when I change the format to "json" or "application/json", the links2 navigation links list is empty, meaning that rental.getNavigations() returns an empty list.</p>
  
  <p>Can anyone help please? I am using Apache Olingo for Java OData v4.</p>
  
  <p>Thanks</p>
  
  <pre><code>URI uri = client.newURIBuilder(serviceRoot)
                   .appendEntitySetSegment("Rentals")
                   .appendKeySegment(1).format("application/xml").build();
  
  ODataRetrieveResponse&lt;ODataEntity&gt; response2 = client.getRetrieveRequestFactory().getEntityRequest(uri).execute();
  ODataEntity rental = response2.getBody();
  
          List&lt;ODataLink&gt; links2 = rental.getNavigationLinks();
          for (ODataLink link : links2) {
              System.out.println(link.getRel());
              System.out.println(link.getName());
              URI linkUri = client.newURIBuilder(serviceRoot)
                        .appendNavigationSegment(link.getLink().toString()).format("atom").build();
              ODataRetrieveResponse&lt;ODataEntity&gt; responseCustomer
                      = client.getRetrieveRequestFactory().getEntityRequest(linkUri).execute();
              ODataEntity cust = responseCustomer.getBody();
              if(link.getName().equals("Stock"))
                  System.out.println(cust.getProperty("Status").getValue().toString()); 
              else System.out.println(cust.getProperty("Name").getValue().toString()); 
         } 
  </code></pre>