Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(607)

Issue 11079010: Extensions Docs Server: Preserve JSON declaration order in extensions documentation (Closed)

Created:
8 years, 2 months ago by cduvall
Modified:
8 years, 1 month ago
CC:
chromium-reviews, Aaron Boodman, mihaip-chromium-reviews_chromium.org
Visibility:
Public.

Description

Extensions Docs Server: Preserve JSON declaration order in extensions documentation All JSON is now parsed using an OrderedDict, so the order of properties is preserved. The order was also being messed up within the JSON Schema Compiler, because lists were being converted to (unordered) dictionaries. BUG=146649, 151867 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=168702

Patch Set 1 #

Patch Set 2 : use OrderedDict for JSON parsing #

Total comments: 6

Patch Set 3 : Tests! #

Total comments: 6

Patch Set 4 : more efficient ordered_dict #

Total comments: 4

Patch Set 5 : fixes #

Total comments: 2

Patch Set 6 : remove parens #

Patch Set 7 : fixes for simplejson #

Patch Set 8 : updated with the new simplejson #

Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -33 lines) Patch
M chrome/common/extensions/docs/server2/api_data_source.py View 1 2 3 4 4 chunks +8 lines, -12 lines 0 comments Download
M chrome/common/extensions/docs/server2/api_data_source_test.py View 1 2 3 4 2 chunks +1 line, -2 lines 0 comments Download
M chrome/common/extensions/docs/server2/build_server.py View 1 2 3 4 5 6 3 chunks +12 lines, -4 lines 0 comments Download
A tools/json_schema_compiler/json_parse.py View 1 2 3 4 5 6 7 1 chunk +57 lines, -0 lines 0 comments Download
M tools/json_schema_compiler/json_schema.py View 1 2 3 4 5 2 chunks +5 lines, -8 lines 0 comments Download
M tools/json_schema_compiler/model.py View 1 2 3 6 chunks +7 lines, -5 lines 0 comments Download
M tools/json_schema_compiler/schema_util.py View 1 2 3 4 3 chunks +4 lines, -2 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
cduvall
kalman: code changes jennb: can you confirm that this works with your Windows checkout? Thanks!
8 years, 2 months ago (2012-10-06 01:01:35 UTC) #1
not at google - send to devlin
There's a bug filed somewhere about sorting items in dictionaries. Summary: we shouldn't sort them, ...
8 years, 2 months ago (2012-10-08 03:52:05 UTC) #2
cduvall
+aa since kalman is out
8 years, 2 months ago (2012-10-12 23:48:34 UTC) #3
Aaron Boodman
Tests for json_parse and ordered_dict? http://codereview.chromium.org/11079010/diff/9009/tools/json_schema_compiler/ordered_dict.py File tools/json_schema_compiler/ordered_dict.py (right): http://codereview.chromium.org/11079010/diff/9009/tools/json_schema_compiler/ordered_dict.py#newcode17 tools/json_schema_compiler/ordered_dict.py:17: class OrderedDict(object): Makes me ...
8 years, 2 months ago (2012-10-16 06:22:34 UTC) #4
cduvall
https://codereview.chromium.org/11079010/diff/9009/tools/json_schema_compiler/ordered_dict.py File tools/json_schema_compiler/ordered_dict.py (right): https://codereview.chromium.org/11079010/diff/9009/tools/json_schema_compiler/ordered_dict.py#newcode17 tools/json_schema_compiler/ordered_dict.py:17: class OrderedDict(object): On 2012/10/16 06:22:34, Aaron Boodman wrote: > ...
8 years, 2 months ago (2012-10-17 00:30:13 UTC) #5
Aaron Boodman
http://codereview.chromium.org/11079010/diff/12001/tools/json_schema_compiler/ordered_dict.py File tools/json_schema_compiler/ordered_dict.py (right): http://codereview.chromium.org/11079010/diff/12001/tools/json_schema_compiler/ordered_dict.py#newcode32 tools/json_schema_compiler/ordered_dict.py:32: self._dict = dict(self._list) You should make one of these ...
8 years, 2 months ago (2012-10-24 01:52:22 UTC) #6
cduvall
I like the list as a pointer to the dict, I should have done that ...
8 years, 1 month ago (2012-10-26 01:09:57 UTC) #7
not at google - send to devlin
aa has already reviewed ordered_dict.py so I didn't look at it. https://codereview.chromium.org/11079010/diff/18001/chrome/common/extensions/docs/server2/api_data_source.py File chrome/common/extensions/docs/server2/api_data_source.py (right): ...
8 years, 1 month ago (2012-11-16 18:45:56 UTC) #8
cduvall
https://codereview.chromium.org/11079010/diff/18001/chrome/common/extensions/docs/server2/api_data_source.py File chrome/common/extensions/docs/server2/api_data_source.py (right): https://codereview.chromium.org/11079010/diff/18001/chrome/common/extensions/docs/server2/api_data_source.py#newcode23 chrome/common/extensions/docs/server2/api_data_source.py:23: if item.get('nodoc', False): On 2012/11/16 18:45:56, kalman wrote: > ...
8 years, 1 month ago (2012-11-17 01:55:11 UTC) #9
not at google - send to devlin
lgtm https://codereview.chromium.org/11079010/diff/34001/tools/json_schema_compiler/json_schema.py File tools/json_schema_compiler/json_schema.py (right): https://codereview.chromium.org/11079010/diff/34001/tools/json_schema_compiler/json_schema.py#newcode14 tools/json_schema_compiler/json_schema.py:14: return (json_parse.IsDict(thing) and thing.get('nocompile', False)) parens unnecessary?
8 years, 1 month ago (2012-11-17 05:55:16 UTC) #10
cduvall
http://codereview.chromium.org/11079010/diff/34001/tools/json_schema_compiler/json_schema.py File tools/json_schema_compiler/json_schema.py (right): http://codereview.chromium.org/11079010/diff/34001/tools/json_schema_compiler/json_schema.py#newcode14 tools/json_schema_compiler/json_schema.py:14: return (json_parse.IsDict(thing) and thing.get('nocompile', False)) On 2012/11/17 05:55:16, kalman ...
8 years, 1 month ago (2012-11-19 20:53:41 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cduvall@chromium.org/11079010/39001
8 years, 1 month ago (2012-11-19 20:55:42 UTC) #12
commit-bot: I haz the power
Presubmit check for 11079010-39001 failed and returned exit status 1. Traceback (most recent call last): ...
8 years, 1 month ago (2012-11-19 20:55:51 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cduvall@chromium.org/11079010/36003
8 years, 1 month ago (2012-11-19 21:45:33 UTC) #14
commit-bot: I haz the power
Presubmit check for 11079010-36003 failed and returned exit status 1. WARNING:root:Using simplejson to parse, this ...
8 years, 1 month ago (2012-11-19 21:47:01 UTC) #15
cduvall
kalman: could you take another look at this? Mainly, do you think the changes I ...
8 years, 1 month ago (2012-11-19 22:40:36 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cduvall@chromium.org/11079010/34011
8 years, 1 month ago (2012-11-20 00:06:56 UTC) #17
commit-bot: I haz the power
8 years, 1 month ago (2012-11-20 02:13:25 UTC) #18
Change committed as 168702

Powered by Google App Engine
This is Rietveld 408576698