code: public static void writeJsonProperty(SlingHttpServletResponse response, Node node, String name)
              throws RepositoryException, IOException {
  
          JsonWriter jsonWriter = getJsonWriter(response);
  
          javax.jcr.Property property = node.getProperty(name);
          if (property != null) {
              JsonUtil.writeJsonProperty(jsonWriter, node, property, getDefaultJsonMapping());
          }
      }
docs: Write one JCR property as JSON object back using the writer of the response (used for GET and PUT).
  
  @param response the HTTP response with the writer
  @param node     the JCR node of the referenced resource
  @param name     the name of the property requested
  @throws RepositoryException error on accessing JCR
  @throws IOException         error on write JSON