Commit Graph

90 Commits

Author SHA1 Message Date
Terminal eef27b88ab
Update PrettyJson.py
fixes #173
2022-10-15 20:53:31 -07:00
TheSecEng b65d96083b
Fixes:
- Fixes#166
- Setting to control format of invalid JSON Fixes #171
- Fixes #169
- Fixes #155
2022-07-22 08:10:17 -05:00
Terminal f844dfd85e
Merge pull request #162 from rchl/fix/jq-check
Fix check for whether jq is installed in the system
2022-05-30 23:47:24 -05:00
Rafal Chlodnicki cb1355a50d Hide sidebar in JQ window as it serves no purpose 2021-12-08 22:04:55 +01:00
Rafal Chlodnicki 768519907e Fix check for whether jq is on the system 2021-12-08 21:24:34 +01:00
TheSecEng dd60a4fbef
fix array comma 2021-07-30 22:53:48 -07:00
TheSecEng e17e458890
fix sorting command 2021-06-28 12:37:22 -07:00
Terminal 6516ce7070
Update PrettyJson.py
Remove print statements
2021-06-12 07:36:41 -07:00
TheSecEng 34c27bcd80
fix array commas 2021-06-12 07:25:16 -07:00
TheSecEng 8d86d63169
fix:
Unloaded settings
2021-05-26 12:29:28 -07:00
TheSecEng a960fb828d
fix: keep_arrays_single_line issue where it splits on `,` in the middle
of a string
2021-05-25 16:50:36 -07:00
TheSecEng 51859d62e8
fix: case when window or active_view is none 2021-05-25 15:58:22 -07:00
TheSecEng b7af550526
Update README 2021-05-04 08:27:11 -07:00
TheSecEng f36ac3dde3
minor code fixes, remove key bindings 2021-05-04 08:04:39 -07:00
TheSecEng 317a1a35b0
fix json format on save, fix json / xml syntax files for ST4, fix jq query, fix double to single quote 2020-08-18 12:37:01 -04:00
TheSecEng d4f0b44a0d
fixes: as_json, pretty, validate
fixes pretty_on_save
fixes validate_on_save
implements as_json
2020-05-19 15:38:44 -04:00
TheSecEng 5220810676
newline isssue 2020-04-26 15:10:50 -04:00
TheSecEng 667cacbbc9
fix: minor changes
fix: README.md
fix: default value of `object_pairs_hook`
2020-04-26 15:07:14 -04:00
TheSecEng 1c2d2262db
fix: Listeners
implement: syntax change only if not currently a syntax
2020-04-20 08:49:01 -04:00
TheSecEng 8f6a38b8d3
implement: get_selection_from_region
fix: PrettyJsonBaseCommand
2020-04-19 17:34:04 -04:00
TheSecEng 7aacb2de85
code cleanup 2020-04-19 13:14:51 -04:00
TheSecEng 0907e45be7
implement: scroll to error 2020-04-18 15:13:20 -04:00
TheSecEng 6470be6750
fix: jq query selection clear 2020-04-17 14:42:28 -04:00
TheSecEng f9a4221dd6
implement: jq live filtering 2020-04-17 14:37:05 -04:00
TheSecEng d1573b0e73
fix: formatting and double quote removal 2020-04-16 17:40:48 -04:00
TheSecEng 9ca958dfc3
implement: duplicate key detection
fix: phantom support
2020-04-16 10:54:25 -04:00
TheSecEng ced7e12107
implement: travis → github actions
implement: #42
update: unit tests
2020-04-16 08:49:10 -04:00
TheSecEng f0c9c8b6a7
fix: formatting, logic flow, f-strings 2020-04-15 20:31:15 -04:00
TheSecEng 623e810569
implement: type hinting
implement: .gitattributes
implement: .python-verison
implement: f'strings

fix: libs -> lib
fix: Sublime Menus
2020-04-15 19:09:43 -04:00
TheSecEng a9fab727fd
fix: double quote to single quote
fix: f strings
2020-04-15 16:06:58 -04:00
TheSecEng 466104e77b
fix: remove unnecessary code 2020-04-15 14:38:03 -04:00
TheSecEng fbf8f27b29
fix: formatting 2020-04-15 14:15:02 -04:00
TheSecEng ac99ee26aa
fix: phantoms 2020-04-15 13:51:54 -04:00
TheSecEng 72adbd6a18
comment: better phantom handling 2020-04-15 13:32:19 -04:00
TheSecEng 7ee91d7feb
update: phantoms rather than regions 2020-04-15 13:28:44 -04:00
TheSecEng 2edda28695
Merge remote-tracking branch 'KuttKatrea/reindent-block' 2020-04-14 17:38:00 -04:00
TheSecEng 551e43f6db
Merge remote-tracking branch 'Silwing/keep-arrays-single-line-fix' 2020-04-14 16:57:42 -04:00
TheSecEng 9521891f9b
Merge remote-tracking branch 'yukixz/fix-one-line-array' 2020-04-14 16:43:35 -04:00
TheSecEng e5f59482c0
Merge remote-tracking branch 'fix-oslinesep/master' 2020-04-14 16:42:11 -04:00
TheSecEng 1c7917875f
implementation: Prettify files that considered as JSON files #85
Author https://github.com/zcold
2020-04-14 16:35:59 -04:00
TheSecEng 6f190adf62
fix: formatting and logic
remove: Sublime Text 2 Support
fix: JSON syntax package location for ST4
fix: empty region logic
2020-04-14 14:10:38 -04:00
mrliaocn 210d6a3a45
Fix an array parse error
When parse an array with config `keep_arrays_single_line = true`, `output_json.replace(m, replacement)` will replace more than once if another array is a subset of current.
Example:
```{"a": [1],"b": [2,3,1]}```
should be parsed like: 
```
{
    "a": [1],
    "b": [2, 3, 1]
}
```
but actually got 
```
{
  "a": [1],
  "b": [
    2,
    3,1]
}
```
2019-12-23 16:59:39 +08:00
Alan Reyes 631cf31b48 Added another way to reindent, based in the current line indentation. Added docs about how to configure the reindent_block setting 2017-11-20 18:03:11 -06:00
Alan Reyes 2e5ea533f8 Added option to reindent prettified block to current indent level of the selection 2017-11-17 12:11:12 -06:00
Randi Katrine Hillerøe 742b26b920
Issue with replacing more than wanted
When finding array matches only the content of the array is replaced. This content can potentially be present in multiple places and will then break later array replacements. The below example can reproduce the issue:
{
  "test": [3, 4],
  "test2": [1, 2, 3, 4],
  "test3": [3, 4]
}

With setting "keep_arrays_single_line": true

Basically the issue occurs for two arrays A, B where A is a suffix of B and A occurs earlier in the JSON document than B.
The fix is to match the whole array, not just the content. Then remove the brackets to split and join and re-add the brackets afterwards.
If the same array occurs multiple times then this will replace all instances during the first replace, however that should not cause any issues.
The fix prevents issues with replacing arrays that are subsets of other arrays.
2017-11-15 12:46:02 +01:00
Dazzy Ding 6e769bd62c Sort matches before replacment on post process 2017-02-18 19:41:53 +08:00
tadashi-aikawa 391ebd8a8c Fix issue #62 2016-12-18 21:14:12 +09:00
Nikolajus 3a3d95994d Sublime 2 compatible 2016-07-15 21:35:07 +02:00
Nikolajus 62bdb1d281 #56 symbol search / goto / jump to source cmd+r 2016-07-15 17:26:56 +02:00
Nikolajus a8648980af small change 2016-07-15 16:08:01 +02:00