pretty-json icon indicating copy to clipboard operation
pretty-json copied to clipboard

Feature Request: Configurable prettification and minification settings

Open lzkelley opened this issue 8 years ago • 2 comments

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.

lzkelley avatar Jun 15 '16 02:06 lzkelley

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

lexicalunit avatar Jun 17 '16 17:06 lexicalunit

+1 for this feature :)

JordanPeltier avatar Aug 14 '17 15:08 JordanPeltier