code: @Deprecated
  	public byte [] writeObject(Object object) throws JsonProcessingException, IllegalAccessException {
  		try {
  			return writeDocument(new JSONAPIDocument<>(object));
  		} catch (DocumentSerializationException e) {
  			throw new RuntimeException(e);
  		}
  	}
docs: Converts input object to byte array.
  @param object input object
  @return raw bytes
  @throws JsonProcessingException
  @throws IllegalAccessException