@Deprecated public <T>byte[] writeObjectCollection(Iterable<T> objects) throws JsonProcessingException, IllegalAccessException {
  try {
    return writeDocumentCollection(new JSONAPIDocument<>(objects));
  }
 catch (  DocumentSerializationException e) {
    if (e.getCause() instanceof JsonProcessingException) {
      throw (JsonProcessingException)e.getCause();
    }
 else     if (e.getCause() instanceof IllegalAccessException) {
      throw (IllegalAccessException)e.getCause();
    }
    throw new RuntimeException(e.getCause());
  }
}

@ Deprecated public < T > byte [ ] writeObjectCollection ( Iterable < T > objects ) throws JsonProcessingException , IllegalAccessException { try { return writeDocumentCollection ( new JSONAPIDocument < > ( objects ) ) ; } catch ( DocumentSerializationException e ) { if ( e . getCause ( ) instanceof JsonProcessingException ) { throw ( JsonProcessingException ) e . getCause ( ) ; } else if ( e . getCause ( ) instanceof IllegalAccessException ) { throw ( IllegalAccessException ) e . getCause ( ) ; } throw new RuntimeException ( e . getCause ( ) ) ; } }
converts input object to byte array .
