--- a/tika-app/src/main/java/org/apache/tika/cli/TikaCLI.java
+++ b/tika-app/src/main/java/org/apache/tika/cli/TikaCLI.java
@@ -99,6 +99,39 @@ public class TikaCLI {
         }
 
     }
+    
+    
+    private final OutputType JSON = new OutputType() {
+        public ContentHandler getContentHandler() throws Exception {
+    final PrintWriter writer =
+    new PrintWriter(getSystemOutWriter(encoding));
+    return new DefaultHandler() {
+        public void endDocument() {
+            String[] names = metadata.names();
+            Arrays.sort(names);
+            
+            int i = 0;
+            String json_comma = ",";
+            StringBuffer buffer = new StringBuffer();
+            buffer.append("{");
+            for (String name : names) {
+                if(i < names.length-1) 
+                    json_comma = ","; 
+                else
+                    json_comma = "";
+                
+                buffer.append("\""+ name +"\""+ ": " + "\""+ metadata.get(name).replace("\"", " ") + "\"" + json_comma);                    		
+                i++;
+            }
+            buffer.append("}");
+            writer.println(buffer.toString());
+            writer.flush();
+        }
+    };
+}
+};    
+
+    
 
     private final OutputType XML = new OutputType() {
         @Override
@@ -232,6 +265,8 @@ public class TikaCLI {
             encoding = arg.substring("-e".length());
         } else if (arg.startsWith("--encoding=")) {
             encoding = arg.substring("--encoding=".length());
+        } else  if (arg.equals("-j") || arg.equals("--json")) {
+            type = JSON;            
         } else if (arg.equals("-x") || arg.equals("--xml")) {
             type = XML;
         } else if (arg.equals("-h") || arg.equals("--html")) {
@@ -288,6 +323,7 @@ public class TikaCLI {
         out.println("    -v  or --verbose     Print debug level messages");
         out.println("    -g  or --gui         Start the Apache Tika GUI");
         out.println("");
+        out.println("    -j  or --json    	  Output json (only metadata)");
         out.println("    -x  or --xml         Output XHTML content (default)");
         out.println("    -h  or --html        Output HTML content");
         out.println("    -t  or --text        Output plain text content");

