When comparing GoSublime vs Pretty JSON, the Slant community recommends GoSublime for most people. In the question“What are the best plugins for Sublime Text?” GoSublime is ranked 10th while Pretty JSON is ranked 20th. The most important reason people chose GoSublime is:
* code completion from Gocode * context aware snippets via the code-completion popup to complement the existing SublimeText Go package. * sublime build system(ctrl+b) integrating with GoSublime 9o command prompt * lint/syntax check as you type * quickly jump to any syntax error reported (and jump back to where you were before (across files)) * quickly fmt your source or automatically on save to conform with the Go standards * easily create a new go file and run it without needing to save it first (9o replay) * share your snippets (anything in the loaded file) on play.golang.org * list declarations in the current file * automatically add/remove package imports * quickly jump your import section(automatically goes to the last import) where you can easily edit the pkg alias and return to where you were before * go to definition of a package function or constant, etc. * show the source(and thus documentation) of a variable without needing to change views
Ranked in these QuestionsQuestion Ranking
Pros
Pro Provides code completion and other IDE-like features
- code completion from Gocode
- context aware snippets via the code-completion popup to complement the existing SublimeText Go package.
- sublime build system(ctrl+b) integrating with GoSublime 9o command prompt
- lint/syntax check as you type
- quickly jump to any syntax error reported (and jump back to where you were before (across files))
- quickly fmt your source or automatically on save to conform with the Go standards
- easily create a new go file and run it without needing to save it first (9o replay)
- share your snippets (anything in the loaded file) on play.golang.org
- list declarations in the current file
- automatically add/remove package imports
- quickly jump your import section(automatically goes to the last import) where you can easily edit the pkg alias and return to where you were before
- go to definition of a package function or constant, etc.
- show the source(and thus documentation) of a variable without needing to change views
Pro Can prettify with configurable indent and optional key sorting
To prettify look for "Pretty JSON: Format (Pretty Print) JSON" via Command Pallette. Indent, key sorting and ASCII ensurance can all be configured.
Pro Can convert JSON to XML
To convert JSON to XML look for "Pretty JSON: JSON 2 XML" via Command Pallette.
Pro Can minify
To compress/minify look for "Pretty JSON: Minify (compress) JSON" via Command Pallette.
Pro Can query
Query/filter requires ./jq and allows slicing, filtering, mapping and transforming data with ease. To query look for "Pretty JSON: jq query" via Command Pallette.