algoliasearch/src/main/java/com/algolia/search/saas/Index.java
public JSONObject saveObject(JSONObject object, String objectID, @Nullable RequestOptions requestOptions) throws AlgoliaException {
        try {
            return client.putRequest("/1/indexes/" + encodedIndexName + "/" + URLEncoder.encode(objectID, "UTF-8"), /* urlParameters: */ null, object.toString(), requestOptions);
        } catch (UnsupportedEncodingException e) {
            throw new RuntimeException(e);
        }
    }
public JSONObject saveObject(JSONObject object, String objectID, @Nullable RequestOptions requestOptions) throws AlgoliaException {
        try {
            return client.putRequest("/1/indexes/" + encodedIndexName + "/" + URLEncoder.encode(objectID, "UTF-8"), /* urlParameters: */ null, object.toString(), requestOptions);
        } catch (UnsupportedEncodingException e) {
            throw new RuntimeException(e);
        }
    }
public JSONObject saveObject ( JSONObject object , String objectID , @ Nullable RequestOptions requestOptions ) throws AlgoliaException { try { return client . putRequest ( "/1/indexes/" + encodedIndexName + "/" + URLEncoder . encode ( objectID , "UTF-8" ) , /* urlParameters: */ null , object . toString ( ) , requestOptions ) ; } catch ( UnsupportedEncodingException e ) { throw new RuntimeException ( e ) ; } }
Override the content of object.

@param object         the object to save
@param requestOptions Request-specific options.
@throws AlgoliaException
Override the content of object .