Ideas of feature: indent parameter + keep order in dict

Michael Palumbo avatarMichael Palumbo created an issue

Hello

First congrats for this app, it's very handy.

Here are two ideas of feature: - be able to set up the indent setting instead of having it hard coding to 2. - keep order in the dict. (using collections.OrderedDict)

What do you think?

Michael

Comments (5)

  1. Matthew Schinckel

    Hi Michael.

    Yeah, the first part sounds fine. I'll put a setting check in.

    I hadn't thought that much about the second part: I have no problems with it, as long as there is not a big performance hit on using that, but since I'm simply using the default simplejson.loads() method, I'm not sure I can easily replace dicts with OrderedDicts.

  2. Matthew Schinckel

    I've been thinking about the INDENT thing. There are a couple of ways to go. It could be a per-field setting (like null, blank or default). Or, it could be a project-wide setting.

  3. Matthew Schinckel

    See 6fd40e0 for a version that uses OrderedDict.

    I'm still 50/50 on this. I may make it that you can set it in settings, as I'm not sure I see the real value in ordered dicts, since mostly data in JS objects is unordered anyway.

    Happy to hear reasons why it might be the default, though.

  4. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.