diff --git a/rbtools/commands/__init__.py b/rbtools/commands/__init__.py
index 9aaeecb7b786f6a4bb7fd9ade359c68ea702288a..f8622f0a2fe76581cb2f9369fbe27e865cb5c682 100644
--- a/rbtools/commands/__init__.py
+++ b/rbtools/commands/__init__.py
@@ -101,23 +101,30 @@ class JSONOutput(object):
     def add_error(self, error):
         """Add new error to 'errors' key.
 
-        Append new error to errors key if it exists. If errors key
-        does not exist, create new list associated with errors and append
-        new error.
+        Append a new error to the ``errors`` key, creating one if needed.
 
         Args:
             error (unicode):
-                Error that will be added to list associated with key 'error'
+                The error that will be added to ``errors``.
         """
-        if 'errors' in self._output:
-            self._output['errors'].append(error)
-        else:
-            self._output['errors'] = [error]
+        self._output.setdefault('errors', []).append(error)
 
-    def print_to_stream(self):
-        """Output JSON string representation to output stream.
+    def add_warning(self, warning):
+        """Add new warning to 'warnings' key.
+
+        Append a new warning to the ``warnings`` key, creating one if needed.
+
+        Args:
+            warning (unicode):
+                The warning that will be added to ``warnings``.
         """
-        self._output_stream.write(json.dumps(self._output, indent=4))
+        self._output.setdefault('warnings', []).append(warning)
+
+    def print_to_stream(self):
+        """Output JSON string representation to output stream."""
+        self._output_stream.write(json.dumps(self._output,
+                                             indent=4,
+                                             sort_keys=True))
         self._output_stream.write('\n')
 
 
diff --git a/rbtools/commands/tests/test_main.py b/rbtools/commands/tests/test_main.py
index c4dcba9adee15cb72cebad554d534cb45c3725fe..0149078f0b47cc628e311940416620bb227a5cfe 100644
--- a/rbtools/commands/tests/test_main.py
+++ b/rbtools/commands/tests/test_main.py
@@ -131,26 +131,19 @@ class JSONOutputTests(kgb.SpyAgency, TestCase):
 
         self.json = JSONOutput(sys.stdout)
 
-    def test_json_wrapper_initializes(self):
-        """Testing JSONOutput instantiates given stream object.
-        """
+    def test_init(self):
+        """Testing JSONOutput instantiates given stream object"""
         self.assertIs(self.json._output_stream, sys.stdout)
-
-    def test_json_wrapper_initiates(self):
-        """Testing JSONOutput instantiates empty dictionary.
-        """
         self.assertEqual(len(self.json._output), 0)
 
-    def test_json_wrapper_add(self):
-        """Testing JSONOutput.add adds a key value pair to output.
-        """
+    def test_add(self):
+        """Testing JSONOutput.add adds a key value pair to output"""
         self.json.add('key', 'value')
 
         self.assertEqual(self.json._output['key'], 'value')
 
-    def test_json_wrapper_append(self):
-        """Testing JSONOutput.append appends to list associated with a key.
-        """
+    def test_append(self):
+        """Testing JSONOutput.append appends to list associated with a key"""
         self.json.add('test', [])
         self.json.append('test', 'test')
 
@@ -163,14 +156,28 @@ class JSONOutputTests(kgb.SpyAgency, TestCase):
 
         self.assertNotIn('nonexistent', self.json._output)
 
-    def test_json_wrapper_add_error(self):
-        """Testing JSONOutput.add_error will append to the errors key if it
-        already exists and create a new errors key if it does not.
-        """
+    def test_add_error_without_key(self):
+        """Testing JSONOutput.add_error without existing key"""
         self.json.add_error('test_error')
 
         self.assertEqual(self.json._output['errors'], ['test_error'])
 
+    def test_add_error_with_key(self):
+        """Testing JSONOutput.add_error with existing key"""
+        self.json.add_error('test_error')
         self.json.add_error('test_error2')
         self.assertEqual(self.json._output['errors'],
                          ['test_error', 'test_error2'])
+
+    def test_add_warning_without_key(self):
+        """Testing JSONOutput.add_warning without existing key"""
+        self.json.add_warning('test_warning')
+
+        self.assertEqual(self.json._output['warnings'], ['test_warning'])
+
+    def test_add_warning_with_key(self):
+        """Testing JSONOutput.add_warning with existing key"""
+        self.json.add_warning('test_warning')
+        self.json.add_warning('test_warning2')
+        self.assertEqual(self.json._output['warnings'],
+                         ['test_warning', 'test_warning2'])
