Coder Social home page Coder Social logo

alfred-qpjson's Introduction

Synopsis

qpjson (Quick & Pretty JSON) is a simple Alfred v2 workflow for converting smooshed up JSON into beautiful, properly whitespaced JSON.

Dependencies & Requirements

qpjson works with a Sublime Text plugin called Pretty JSON. The plugin works with both version 2 and version 3 of Sublime Text, and and there is a version of qpjson for each as well. The plugin can be found here: https://packagecontrol.io/packages/Pretty%20JSON

If Alfred does not currently have Accessibility access through System Preferences, you will be prompted to allow Alfred to control your computer the first time you execute the workflow. This step is required for the workflow to function properly.

Use

You can use qpjson with either hotkeys or keywords in Alfred. You must set the hotkeys in the Workflow section of Alfred's preferences. There is a hotkey tree that used selected text, and a hotkey tree that uses pasted text.

You can also open Alfred, type "json", and paste in your json data that you want beautified. This works out of the box.

Code Example

Here is some digusting JSON barf for you to experiment on.

{"widget":{"debug":"on","window":{"title":"Sample Konfabulator Widget","name":"main_window","width":500,"height":500},"image":{"src":"Images/Sun.png","name":"sun1","hOffset":250,"vOffset":250,"alignment":"center"},"text":{"data":"Click Here","size":36,"style":"bold","name":"text1","hOffset":250,"vOffset":100,"alignment":"center","onMouseUp":"sun1.opacity = (sun1.opacity / 100) * 90;"}}}

alfred-qpjson's People

Stargazers

Seth P avatar Bret Comnes avatar Aaron Schuman avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.