-
Notifications
You must be signed in to change notification settings - Fork 1
/
json-par-fixup.el
751 lines (698 loc) · 28.5 KB
/
json-par-fixup.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
;;; json-par-fixup.el --- Fixing JSON in JSON Par mode -*- lexical-binding: t -*-
;; Copyright (C) 2023 taku0
;;
;; Author: taku0 <mxxouy6x3m_github@tatapa.org>
;; URL: https://github.com/taku0/json-par
;; This file is not part of GNU Emacs.
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;; Code:
(require 'json-par-lexer)
(require 'json-par-delete)
(require 'json-par-insert)
(defvar-local json-par--changed-region-start nil)
(defvar-local json-par--changed-region-end nil)
(defvar-local json-par--inhibit-modification-hooks nil)
(defvar-local json-par--inhibit-fixup-tick nil
"Suppress fixing if this variable equal to `buffer-chars-modified-tick'.")
(defun json-par--reset-changed-region ()
"Clear the markers of the changed region."
(when json-par--changed-region-start
(set-marker json-par--changed-region-start nil))
(when json-par--changed-region-end
(set-marker json-par--changed-region-end nil)))
(defun json-par--update-changed-region (start end _length)
"Update the markers of the changed region.
Intended for `after-change-functions'.
See `after-change-functions' for START, END, and _LENGTH."
(unless json-par--inhibit-modification-hooks
(if json-par--changed-region-start
(if (marker-position json-par--changed-region-start)
(set-marker json-par--changed-region-start
(min json-par--changed-region-start
start))
(set-marker json-par--changed-region-start start))
(setq json-par--changed-region-start (copy-marker start)))
(if json-par--changed-region-end
(if (marker-position json-par--changed-region-end)
(set-marker json-par--changed-region-end
(max json-par--changed-region-end
end))
(set-marker json-par--changed-region-end end))
(setq json-par--changed-region-end (copy-marker end)))))
(defun json-par--fixup-changed-region ()
"Fixup changed region.
Remove redundant commas.
Insert missing commas.
Quote unquoted keys.
Insert empty keys if missing."
(when (and (not (memq this-command '(undo undo-only undo-redo)))
(not (eq json-par--inhibit-fixup-tick
(buffer-chars-modified-tick))))
(json-par--clean-up-protection-markers)
(when (and json-par--changed-region-start
json-par--changed-region-end
(marker-position json-par--changed-region-start)
(marker-position json-par--changed-region-end))
(json-par-fixup-region json-par--changed-region-start
json-par--changed-region-end)))
(json-par--reset-changed-region))
(defun json-par--clean-up-protection-markers ()
"Clean up protection markers if protected region contain some value."
(let ((protection-markers json-par--protection-markers)
(changed nil))
(setq json-par--protection-markers
(cl-remove-if-not
(lambda (marker)
(let (token valid)
(setq valid
(and (or (null (char-before marker))
(memq (char-after marker) '(?\[ ?\( ?{ ?,)))
(save-excursion
(goto-char marker)
(when (memq (char-after marker) '(?\[ ?\( ?{ ?,))
(forward-char))
(setq token (json-par-forward-token))
(or (json-par-token-comma-p token)
(json-par-token-close-bracket-p token)
(json-par-token-outside-of-buffer-p token)))))
(unless valid
(push (list
'apply
(lambda (position)
(move-marker marker position))
(marker-position marker))
buffer-undo-list)
(move-marker marker nil)
(setq changed t))
valid))
json-par--protection-markers))
(when changed
(json-par--record-protection-markers-to-undo-list protection-markers))))
(defun json-par-fixup-region (start end)
"Fixup region (START END).
Remove redundant commas.
Insert missing commas.
Quote unquoted keys.
Insert empty keys if missing.
Remove spaces inside empty array/object.
Redundant commas are not deleted if the comma is inserted by
`json-par-insert-comma' and the point is on the empty member resulted from the
`json-par-insert-comma' invocation.
Regions between top-level values are not modified."
(interactive "r")
(save-match-data
(save-excursion
(goto-char start)
(json-par--out-comment)
(setq start (point))
(json-par--out-atom)
(when (/= start (point))
(json-par-backward-token))
(setq start (point)))
(save-excursion
(goto-char end)
(json-par--out-comment)
(json-par--out-atom)
(setq end (point-marker)))
(let* ((json-par--inhibit-modification-hooks t)
following-token
current-token
preceding-token
newline-after-preceding-colon
newline-before-following-colon
only-one-value-between-colons
depth)
(save-excursion
(goto-char end)
(setq following-token (json-par-forward-token))
(goto-char end)
(setq depth (nth 0 (syntax-ppss)))
(while (progn
(setq current-token (json-par-backward-token))
(and
(<= start (json-par-token-start following-token))
(or
(not (json-par-token-outside-of-buffer-p following-token))
(not (json-par-token-outside-of-buffer-p current-token)))))
(cond
;; Between top-level values.
((zerop depth)
(setq following-token current-token))
;; Before an object key.
((json-par--object-key-p following-token t)
;; Case 1:
;; {
;; "a": "b",
;; "following-token": "b"
;; }
;; OK.
;;
;; Case 2:
;; {
;; "following-token": "b"
;; }
;; OK.
;;
;; Case 3:
;; {
;; "a": "current-token"
;; "following-token": "b"
;; }
;; Insert a comma after the current token.
;;
;; Case 4:
;; {
;; "a":
;; "following-token": "b"
;; }
;; Insert a comma after the current token.
;;
;; Case 5:
;; {
;; "a": "following-token"
;; : "b"
;; }
;; Insert a comma and an empty key after the following token.
;;
;; Case 6:
;; {
;; "a": "following-token": "b"
;; }
;; Insert a comma after the current token.
(cond
;; Case 1 or 2.
((or (json-par-token-comma-p current-token)
(json-par-token-open-bracket-p current-token)
(json-par-token-outside-of-buffer-p current-token))
(setq following-token current-token))
;; Case 3, 4, or 6.
((save-excursion
(goto-char (json-par-token-end following-token))
(json-par--forward-spaces t)
(eq (char-after) ?:))
(goto-char (json-par-token-end current-token))
(json-par-insert-comma))
;; Case 5.
(t
(goto-char (json-par-token-end following-token))
(json-par-insert-comma))))
;; Before a value.
((or (json-par-token-string-p following-token)
(json-par-token-number-p following-token)
(json-par-token-constant-p following-token)
(json-par-token-other-p following-token)
(json-par-token-open-bracket-p following-token))
(if (or (json-par-token-string-p current-token)
(json-par-token-number-p current-token)
(json-par-token-constant-p current-token)
(json-par-token-close-bracket-p current-token)
(json-par-token-other-p current-token))
;; A comma is missing. Insert it.
(progn
(goto-char (json-par-token-end current-token))
(json-par-insert-comma))
;; Otherwise, go ahead.
(setq following-token current-token)))
;; Before a colon.
((json-par-token-colon-p following-token)
;; Case 1:
;; {
;; "a": "b",
;; "current-token": "b"
;; }
;; OK.
;;
;; Case 2:
;; {
;; "a": "b",
;; : "b"
;; }
;; Insert an empty key before the following token.
;;
;; Case 3:
;; {
;; "a":
;; "current-token": "b"
;; }
;; This case will be handled by the next iteration. Keep as is.
;;
;; Case 4:
;; {
;; "a": "current-token"
;; : "b"
;; }
;; Insert an empty key before the following token. A comma will be
;; inserted in the next iteration.
;;
;; Case 5:
;; {
;; "a": "current-token" : "b"
;; }
;; This case will be handled by next iteration. Keep as is.
;;
;; Case 6:
;; {
;; "a":
;; : "b"
;; }
;; Insert an empty key before the following token. A comma will be
;; inserted in the next iteration.
;;
;;
;; For the folloing cases, assuming the key is not quoted. Quote
;; tokens before the colon. The key must not contain line breaks,
;; colons, commas, or double quotes.
;;
;; Case 7:
;; {
;; "a": [1] [2]
;; [3] [4]: "b"
;; }
;; Quote "[3] [4]". A comma will be inserted in the next iteration.
;;
;; Case 8:
;; {
;; "a": [1] [2], [3] [4]: "b"
;; }
;; Quote "[3] [4]".
;;
;; Case 9:
;; {
;; "a": 1, [2
;; 3] 4: "b"
;; }
;; Quote "4"
;;
;; Case 10:
;; {
;; "a": 1, [2
;; 3 4]: "b"
;; }
;; Insert an empty key before the following token.
;;
;;
;; If tokens can be the key of the current member or the value of
;; the previous member, check newlines around the tokens.
;;
;; Case 11:
;; {
;; "a": 1 2
;; : "b"
;; }
;; Insert an empty key before the following token.
;;
;; Case 12:
;; {
;; "a":
;; 1 2: "b"
;; }
;; Quote "1 2".
;;
;; Case 13:
;; {
;; "a":
;; 1
;; 2
;; : "b"
;; }
;; Quote "2".
;;
;; Case 14:
;; {
;; "a":
;; 1
;; : "b"
;; }
;; Insert an empty key before the following token.
;;
;; Case 15:
;; {
;; "a": 1 : "b"
;; }
;; Insert a comma after the current.
;;
;; Case 16:
;; {
;; "a": 1 2 3 : "b"
;; }
;; Quote "2 3".
(cond
;; Case 1, 3, or 5.
((and (json-par-token-string-p current-token)
(or (json-par--same-line-p
(json-par-token-end current-token)
(json-par-token-start following-token))
(save-excursion
(json-par--backward-spaces)
(memq (char-before) '(nil ?\[ ?\( ?{ ?,)))))
(setq following-token current-token))
;; Case 2.
((or (json-par-token-comma-p current-token)
(json-par-token-open-bracket-p current-token)
(json-par-token-outside-of-buffer-p current-token))
(goto-char (json-par-token-start following-token))
(json-par--insert-key "\"\"" current-token following-token))
;; Case 4 or 6.
((or (json-par-token-string-p current-token)
(json-par-token-colon-p current-token))
(goto-char (json-par-token-start following-token))
(json-par--insert-key "\"\"" current-token following-token))
;; Other cases.
(t
(goto-char (json-par-token-end current-token))
(setq preceding-token (json-par-backward-token-or-list))
(while (and (json-par--same-line-p
(point)
(json-par-token-start current-token))
(not (json-par-token-string-p preceding-token))
(not (json-par-token-colon-p preceding-token))
(not (json-par-token-comma-p preceding-token))
(not (json-par-token-open-bracket-p preceding-token))
(not (json-par-token-outside-of-buffer-p
preceding-token)))
(setq preceding-token (json-par-backward-token-or-list)))
(cond
((json-par-token-outside-of-buffer-p preceding-token)
t)
((json-par-token-open-bracket-p preceding-token)
(json-par-forward-token))
(t
(json-par-forward-token-or-list)))
(json-par--forward-spaces)
(cond
;; No tokens to quote. Insert an empty key.
((eq (char-after) ?:)
(json-par--insert-key "\"\"" current-token following-token))
;; Candidate key is between colons.
((save-excursion
(json-par--backward-spaces)
(eq (char-before) ?:))
(setq newline-after-preceding-colon
(save-excursion
(json-par--backward-spaces t)
(not (eq (char-before) ?:))))
(setq newline-before-following-colon
(save-excursion
(goto-char (json-par-token-start following-token))
(json-par--backward-spaces t)
(bolp)))
(setq only-one-value-between-colons
(save-excursion
(json-par-forward-token-or-list)
(json-par--forward-spaces)
(eq (char-after) ?:)))
(cond
((and (not newline-after-preceding-colon)
newline-before-following-colon)
(json-par--insert-key "\"\"" current-token following-token))
((and newline-after-preceding-colon
(not newline-before-following-colon))
(json-par-stringify-region
(point)
(json-par-token-end current-token))
(setq following-token
(save-excursion (json-par-forward-token))))
(only-one-value-between-colons
(json-par--insert-key "\"\"" current-token following-token))
(t
(json-par-forward-token-or-list)
(json-par--forward-spaces)
(json-par-stringify-region
(point)
(json-par-token-end current-token))
(setq following-token
(save-excursion (json-par-forward-token))))))
;; Otherwise, quote the tokens.
(t
(json-par-stringify-region
(point)
(json-par-token-end current-token))
(setq following-token
(save-excursion (json-par-forward-token))))))))
;; Before a close bracket or the end of the buffer.
((or (json-par-token-close-bracket-p following-token)
(json-par-token-outside-of-buffer-p following-token))
(cond
;; The current token is a redundant comma. Remove it.
((json-par-token-comma-p current-token)
(json-par--delete-redundant-comma current-token))
;; Empty array/object. Remove spaces inside it.
((and (json-par-token-open-bracket-p current-token)
(json-par-token-close-bracket-p following-token)
(save-excursion
(goto-char (json-par-token-end current-token))
(skip-chars-forward "\s\t")
(eq (point) (json-par-token-start following-token))))
(delete-region (json-par-token-end current-token)
(json-par-token-start following-token))
(setq following-token current-token))
;; Otherwise, go ahead.
(t
(setq following-token current-token))))
;; Before a comma
((json-par-token-comma-p following-token)
(if (or (json-par-token-comma-p current-token)
(json-par-token-open-bracket-p current-token)
(json-par-token-outside-of-buffer-p current-token))
;; The following token is a redundant comma. Remove it.
(progn
(json-par--delete-redundant-comma following-token)
(setq following-token current-token))
;; Otherwise, go ahead.
(setq following-token current-token)))
(t
(error "Unkown token type: %s"
(json-par-token-type following-token))))
(cond
((json-par-token-open-bracket-p current-token)
(setq depth (1- depth)))
((json-par-token-close-bracket-p current-token)
(setq depth (1+ depth))))))
(json-par--fixup-region-insert-newlines-if-needed start end)
(json-par--free-marker end))))
(defun json-par--delete-redundant-comma (comma)
"Delete redundant COMMA token.
Spaces and line breaks around the comma is adjusted."
(let* ((next-token (save-excursion
(goto-char (json-par-token-end comma))
(json-par-forward-token)))
(previous-token (save-excursion
(goto-char (json-par-token-start comma))
(json-par-backward-token)))
(is-last-member
(or (json-par-token-close-bracket-p next-token)
(json-par-token-outside-of-buffer-p next-token)))
(is-first-member
(or (json-par-token-open-bracket-p previous-token)
(json-par-token-outside-of-buffer-p previous-token)))
(is-first-member-of-line
(json-par--beginning-of-line-or-list-p (json-par-token-start comma)))
(is-last-member-of-line
(json-par--end-of-line-or-list-p (json-par-token-end comma)))
(is-protected (cl-some
(lambda (marker)
(or (= marker (json-par-token-start comma))
(save-excursion
(goto-char marker)
(forward-char)
(json-par--forward-spaces)
(= (point) (json-par-token-start comma)))))
json-par--protection-markers))
start
end)
(cond
;; The comma is protected.
(is-protected
nil)
;; The comma is the only content of an array/object.
((and is-first-member is-last-member)
(delete-region (json-par-token-end previous-token)
(json-par-token-start next-token)))
;; The comma is at the end of an array/object.
(is-last-member
(setq end (save-excursion
(goto-char (json-par-token-start next-token))
(json-par--backward-spaces t)
(if (bolp)
(1- (point))
(goto-char (json-par-token-start next-token))
(when (memq (char-before) '(?\s ?\t))
(backward-char))
(point))))
(delete-region (json-par-token-end previous-token) end))
;; The comma is at the start of an array/object.
(is-first-member
(setq start (save-excursion
(goto-char (json-par-token-end previous-token))
(json-par--forward-spaces t)
(if (or (eolp)
(and (eq (char-after) ?/)
(eq (char-after (1+ (point))) ?/)))
(progn
(forward-line)
(json-par--forward-spaces t)
(point))
(goto-char (json-par-token-end previous-token))
(when (memq (char-after) '(?\s ?\t))
(forward-char))
(point))))
(delete-region start (json-par-token-start next-token)))
;; The comma is the only content of a line.
((and is-first-member-of-line is-last-member-of-line)
(delete-region (json-par-token-start comma)
(json-par-token-start next-token)))
;; The comma is at the end of a line
(is-last-member-of-line
(delete-region (json-par-token-end previous-token)
(json-par-token-end comma)))
;; The comma is at the start of a line
(is-first-member-of-line
(delete-region (json-par-token-start comma)
(json-par-token-start next-token)))
;; Otherwise
(t
(delete-region (json-par-token-start comma)
(json-par-token-start next-token))))))
(defun json-par--fixup-region-insert-newlines-if-needed (start end)
"Insert newlines before/after the modified region (START END) if needed.
Insert newlines if and only if the containing array/object have line breaks
after each members around the region."
(save-excursion
(goto-char start)
(json-par--forward-spaces)
(when (and (eq (char-after) ?,)
(< start end))
(forward-char)
(json-par--forward-spaces)
(setq start (point))))
(unless (eq (save-excursion
(goto-char start)
(json-par--backward-spaces)
(point))
(save-excursion
(goto-char end)
(json-par--backward-spaces)
(point)))
(let (parent-token-of-start
parent-token-of-end
multiple-members-on-current-line
multiple-members-on-same-line-before-point
multiple-members-on-same-line-after-point
insert-newline-before-start
insert-newline-after-end)
(save-excursion
(goto-char start)
(setq parent-token-of-start (json-par--parent-token))
(goto-char end)
(setq parent-token-of-end (json-par--parent-token))
(setq multiple-members-on-current-line
(and
(json-par--same-line-p start end)
(progn
(goto-char start)
(json-par--backward-spaces t)
(not (bolp)))
(progn
(goto-char end)
(json-par--forward-spaces t)
(not (eolp)))))
(setq multiple-members-on-same-line-before-point
(progn
(goto-char start)
(json-par--backward-spaces)
(when (eq (char-before) ?,)
(backward-char))
(json-par--multiple-members-on-same-line-before-point-p 3)))
(setq multiple-members-on-same-line-after-point
(progn
(goto-char end)
(json-par--forward-spaces)
(when (json-par--same-line-p (point) end)
(or (zerop (json-par-forward-member))
(progn
(json-par-end-of-member)
(json-par--forward-spaces))))
(and (not (memq (char-after) '(?\] ?\) ?} nil)))
(json-par--multiple-members-on-same-line-after-point-p
3))))
(if (eq (json-par-token-start parent-token-of-start)
(json-par-token-start parent-token-of-end))
(progn
(setq insert-newline-before-start
(and (not (json-par--same-line-p
(json-par-token-start parent-token-of-start)
start))
(not multiple-members-on-current-line)
(not multiple-members-on-same-line-before-point)
(not multiple-members-on-same-line-after-point)))
(setq insert-newline-after-end insert-newline-before-start))
(setq insert-newline-before-start
(and (not (json-par--same-line-p
(json-par-token-start parent-token-of-start)
start))
(not multiple-members-on-current-line)
(not multiple-members-on-same-line-before-point)))
(setq insert-newline-after-end
(and (progn
;; Current line doesn't contain the closing bracket.
;; Note that `json-par-up-forward' is much slower than
;; `json-par-up-backward' or `json-par--parent-token'.
(end-of-line)
(eq (json-par-token-start (json-par--parent-token))
(json-par-token-start parent-token-of-end)))
(not multiple-members-on-current-line)
(not multiple-members-on-same-line-after-point))))
(when insert-newline-after-end
(goto-char end)
(json-par--backward-spaces t)
(when (eq (char-before) ?,)
(json-par--forward-spaces t)
(when (eq (char-after) ?,)
(forward-char)
(json-par--forward-spaces t))
(unless (eolp)
(newline-and-indent))))
(when insert-newline-before-start
(goto-char start)
(json-par--forward-spaces t)
(unless (or (eolp)
(and (eq (char-after) ?/)
(eq (char-after (1+ (point))) ?/)))
(json-par--backward-spaces t)
(when (eq (char-before) ?,)
(newline-and-indent))))))))
;; TODO
(defun json-par--add-fixup-advice (f)
"Add `json-par--fixup-advice' around F."
(advice-add f :around #'json-par--fixup-advice))
(defun json-par--fixup-advice (oldfun &rest args)
"Record changed region and fixup the region after calling OLDFUN.
This advice is no-op if `json-par--update-changed-region' is installed as a
`after-change-functions'.
ARGS are passed to the OLDFUN."
(let ((hook-installed
(memq #'json-par--update-changed-region after-change-functions)))
(unless hook-installed
(add-hook 'after-change-functions
#'json-par--update-changed-region
nil
t))
(unwind-protect
(prog1 (apply oldfun args)
(unless hook-installed
(json-par--fixup-changed-region)))
(unless hook-installed
(remove-hook
'after-change-functions #'json-par--update-changed-region t)))))
(provide 'json-par-fixup)
;;; json-par-fixup.el ends here