We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0b31cc9 commit 98c8126Copy full SHA for 98c8126
occi/http/content_json.py
@@ -84,7 +84,10 @@ def _render_obj_list(self, objects):
84
json_data = []
85
for obj in objects:
86
json_data.append(self._json_obj(obj))
87
- return json_data
+
88
+ # Workaround JSON array vulnerability in browser JavaScript
89
+ # implementations
90
+ return { 'collection': json_data }
91
92
def _json_obj(self, obj):
93
"""Render `DataObject` into a JSON-friendly dictionary structure.
@@ -164,7 +167,6 @@ def _json_obj(self, obj):
164
167
165
168
return json_obj
166
169
-
170
def register():
171
register_parser(CONTENT_TYPE, JSONParser)
172
register_renderer(CONTENT_TYPE, JSONRenderer)
0 commit comments