diff --git a/src/jsonlogger.py b/src/jsonlogger.py
index <HASH>..<HASH> 100644
--- a/src/jsonlogger.py
+++ b/src/jsonlogger.py
@@ -20,7 +20,13 @@ class JsonFormatter(logging.Formatter):
         if "asctime" in formatters:
             record.asctime = self.formatTime(record, self.datefmt)
 
-        log_record = {}
+        try:
+            #Support order in python 2.7 and 3
+            from collections import OrderedDict
+            log_record = OrderedDict()
+        except:
+            log_record = {}
+
         for formatter in formatters:
             log_record[formatter] = record.__dict__[formatter]
 
diff --git a/tests/tests.py b/tests/tests.py
index <HASH>..<HASH> 100644
--- a/tests/tests.py
+++ b/tests/tests.py
@@ -68,7 +68,7 @@ class testJsonLogger(unittest.TestCase):
         for supported_key in supported_keys:
             if supported_key in log_json:
                 self.assertTrue(True)
-
+    
     def testUnknownFormatKey(self):
         fr = jsonlogger.JsonFormatter('%(unknown_key)s %(message)s')
         self.logHandler.setFormatter(fr)
Converted log_record dictionary to use OrderedDict if it is supported