code: public JsonObject putAndEncrypt(final String name, final Object value, String providerName) {
          addValueEncryptionInfo(name, providerName, true);
          if (this == value) {
              throw new IllegalArgumentException("Cannot put self");
          } else if (value == JsonValue.NULL) {
              putNull(name);
          } else if (checkType(value)) {
              content.put(name, value);
          } else {
              throw new IllegalArgumentException("Unsupported type for JsonObject: " + value.getClass());
          }
          return this;
      }
docs: Stores the {@link Object} value as encrypted identified by the field name.
  
  Note that the value is checked and a {@link IllegalArgumentException} is thrown if not supported.
  
  Note: Use of the Field Level Encryption functionality provided in the
  com.couchbase.client.encryption namespace provided by Couchbase is
  subject to the Couchbase Inc. Enterprise Subscription License Agreement
  at https://www.couchbase.com/ESLA-11132015.
  
  @param name the name of the JSON field.
  @param value the value of the JSON field.
  @param providerName Crypto provider name for encryption.
  @return the {@link JsonObject}.