code: public Map<String, Object> toDecryptedMap(String providerName) throws Exception {
          Map<String, Object> copy = new HashMap<String, Object>(content.size());
          for (Map.Entry<String, Object> entry : content.entrySet()) {
              Object content = entry.getValue();
              String key = entry.getKey();
             if (entry.getKey().startsWith(ENCRYPTION_PREFIX)) {
                  content = decrypt((JsonObject) entry.getValue(), providerName);
                  key = key.replace(ENCRYPTION_PREFIX, "");
              }
              if (content instanceof JsonObject) {
                 JsonObject value = (JsonObject)content;
                 value.setCryptoManager(this.cryptoManager);
                 copy.put(key,  ((JsonObject) content).toDecryptedMap(providerName));
              } else if (content instanceof JsonArray) {
                  copy.put(key, ((JsonArray) content).toList());
              } else {
                  copy.put(key, content);
              }
          }
          return copy;
      }
docs: Transforms the {@link JsonObject} into a {@link Map}. The resulting
  map is not backed by this {@link JsonObject}, and all sub-objects or
  sub-arrays ({@link JsonArray}) are also recursively converted to
  maps and lists, respectively. The encrypted values are decrypted.
  
  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.
  
  @return the content copied as a {@link Map}.