code: @Deprecated
      public static String jsonEncodedStringFor(Value value) {
          try {
              if (value.getType() != PropertyType.BINARY) {
                  return value.getString();
              }
  
              // Encode the binary value in Base64 ...
              InputStream stream = value.getBinary().getStream();
              try {
                  return Base64.encode(stream);
              } finally {
                  if (stream != null) {
                      try {
                          stream.close();
                      } catch (IOException e) {
                          // Error accessing the value, so throw this ...
                          LOGGER.error(e.getMessage(), e);
                      }
                  }
              }
          } catch (RepositoryException e) {
              LOGGER.error(e.getMessage(), e);
              return null;
          }
      }
docs: Return the JSON-compatible string representation of the given property value. If the value is a
  {@link javax.jcr.PropertyType#BINARY binary} value, then this method returns the Base-64 encoding of that value. Otherwise,
  it just returns the string representation of the value.
  
  @param value the property value; may not be null
  @return the string representation of the value
  @deprecated since 3.0 binary values are handled via URLs