code: public static void dumpConfiguration(Configuration config,
  	                                     String propertyName, Writer out) throws IOException {
  		if(Strings.isNullOrEmpty(propertyName)) {
  			dumpConfiguration(config, out);
  		} else if (Strings.isNullOrEmpty(config.get(propertyName))) {
  			throw new IllegalArgumentException("Property " +
  					propertyName + " not found");
  		} else {
  			JsonFactory dumpFactory = new JsonFactory();
  			JsonGenerator dumpGenerator = dumpFactory.createGenerator(out);
  			dumpGenerator.writeStartObject();
  			dumpGenerator.writeFieldName("property");
  			appendJSONProperty(dumpGenerator, config, propertyName,
  					new ConfigRedactor(config));
  			dumpGenerator.writeEndObject();
  			dumpGenerator.flush();
  		}
  	}
docs: Writes properties and their attributes (final and resource)
  to the given {@link Writer}.
  
  <li>
  When propertyName is not empty, and the property exists
  in the configuration, the format of the output would be,
  <pre>
  {
  "property": {
  "key" : "key1",
  "value" : "value1",
  "isFinal" : "key1.isFinal",
  "resource" : "key1.resource"
  }
  }
  </pre>
  </li>
  
  <li>
  When propertyName is null or empty, it behaves same as
  {@link #dumpConfiguration(Configuration, Writer)}, the
  output would be,
  <pre>
  { "properties" :
  [ { key : "key1",
  value : "value1",
  isFinal : "key1.isFinal",
  resource : "key1.resource" },
  { key : "key2",
  value : "value2",
  isFinal : "ke2.isFinal",
  resource : "key2.resource" }
  ]
  }
  </pre>
  </li>
  
  <li>
  When propertyName is not empty, and the property is not
  found in the configuration, this method will throw an
  {@link IllegalArgumentException}.
  </li>
  <p>
  @param config the configuration
  @param propertyName property name
  @param out the Writer to write to
  @throws IOException
  @throws IllegalArgumentException when property name is not
  empty and the property is not found in configuration