code: protected void setPropertyOnNode(Node node,
                                       String propName,
                                       Object value) throws RepositoryException {
          // Are the property values encoded ?
          boolean encoded = propName.endsWith(BASE64_ENCODING_SUFFIX);
          if (encoded) {
              int newLength = propName.length() - BASE64_ENCODING_SUFFIX.length();
              propName = newLength > 0 ? propName.substring(0, newLength) : "";
          }
  
          Object values = convertToJcrValues(node, value, encoded);
          if (values == null) {
              // remove the property
              node.setProperty(propName, (Value) null);
          } else if (values instanceof Value) {
              node.setProperty(propName, (Value) values);
          } else {
              node.setProperty(propName, (Value[]) values);
          }
      }
docs: Sets the named property on the given node. This method expects {@code value} to be either a JSON string or a JSON array of
  JSON strings. If {@code value} is a JSON array, {@code Node#setProperty(String, String[]) the multi-valued property setter}
  will be used.
  
  @param node     the node on which the property is to be set
  @param propName the name of the property to set
  @param value    the JSON-encoded values to be set
  @throws javax.jcr.RepositoryException if there is an error setting the property