diff --git a/django_js_reverse/core.py b/django_js_reverse/core.py
index <HASH>..<HASH> 100755
--- a/django_js_reverse/core.py
+++ b/django_js_reverse/core.py
@@ -1,4 +1,5 @@
 # -*- coding: utf-8 -*-
+import collections
 import json
 import re
 import sys
@@ -105,10 +106,11 @@ def generate_json(default_urlresolver, script_prefix=None):
     if script_prefix is None:
         script_prefix = urlresolvers.get_script_prefix()
 
+    # Ensure consistent ouptut ordering
     urls = sorted(list(prepare_url_list(default_urlresolver)))
 
-    return {
-        'urls': [
+    return collections.OrderedDict([
+        ('urls', [
             [
                 force_text(name),
                 [
@@ -116,15 +118,15 @@ def generate_json(default_urlresolver, script_prefix=None):
                     for path, args in patterns
                 ],
             ] for name, patterns in urls
-        ],
-        'prefix': script_prefix,
-    }
+        ]),
+        ('prefix', script_prefix),
+    ])
 
 
 def _safe_json(obj):
     return mark_safe(
         json
-        .dumps(obj, sort_keys=True)
+        .dumps(obj)
         .replace('>', '\\u003E')
         .replace('<', '\\u003C')
         .replace('&', '\\u0026')
Switch to using an OrderedDict for key ordering