Ideas of feature: indent parameter + keep order in dict

Issue #18 new
Michael Palumbo
created an issue


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?


Comments (6)

  1. Matthew Schinckel repo owner

    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 repo owner

    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 repo owner

    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