federomero / pretty-json

Atom plugin. Format JSON documents.
MIT License
94 stars 23 forks source link

Feature Request: Configurable prettification and minification settings #47

Open lzkelley opened 8 years ago

lzkelley commented 8 years ago

I would find it super convenient if the plugin allowed varying degrees of minification / prettification --- in the same way as text-folding.

For example, for the given super-simple json, pretty-json allows you to do either,

{
    "deleteoldevents": {
        "nice_name": "Deleting old events",
        "update": "False",
        "module": "importer.importer",
        "function": "delete_old_event_files",
        "priority": 0
    },
    "internal": {
        "nice_name": "%pre metadata and photometry",
        "update": "False",
        "module": "importer.mtasks.general_data",
        "function": "do_internal",
        "priority": 1
    }
}

or

{"deleteoldevents":{"nice_name":"Deleting old events","update":"False","module":"importer.importer","function":"delete_old_event_files","priority":0},"internal":{"nice_name":"%pre metadata and photometry","update":"False","module":"importer.mtasks.general_data","function":"do_internal","priority":1}}

I'd like to also be able to choose:

{
    "deleteoldevents":{"nice_name":"Deleting old events","update":"False","module":"importer.importer","function":"delete_old_event_files","priority":0}
    "internal":{"nice_name":"%pre metadata and photometry","update":"False","module":"importer.mtasks.general_data","function":"do_internal","priority":1} 
}

etc.

lexicalunit commented 8 years ago

This would be a pretty cool feature and I bet there's some really slick libraries out there someone could leverage to accomplish this. I don't have the time at the moment myself to look into it. But I'm totally willing to code review anyone's PR to resolve this issue. So if you're reading this, and you think you might be able to solve this, please take a crack at it! <3

JordanPeltier commented 7 years ago

+1 for this feature :)