alek-sys / sublimetext_indentxml

Plugin for Sublime Text editor for reindenting XML and JSON files
MIT License
534 stars 135 forks source link

json indent doesnt work on some files. #64

Closed ctf0 closed 8 years ago

ctf0 commented 10 years ago

big files wont indent ,dont know if its related to the file it self or just because there are too many lines ,here is what i get in console

indent_json

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 549, in run_
    return self.run(edit)
  File "indentxml in /Users/Novo/Library/Application Support/Sublime Text 3/Installed Packages/Indent XML.sublime-package", line 49, in run
  File "indentxml in /Users/Novo/Library/Application Support/Sublime Text 3/Installed Packages/Indent XML.sublime-package", line 116, in indent
  File "./json/__init__.py", line 319, in loads
  File "./json/decoder.py", line 352, in decode
  File "./json/decoder.py", line 368, in raw_decode
  File "./json/scanner.py", line 38, in _scan_once
  File "./json/decoder.py", line 176, in JSONObject
ValueError: Expecting property name enclosed in double quotes: line 2 column 1 (char 2)

auto_indent

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 549, in run_
    return self.run(edit)
  File "indentxml in /Users/Novo/Library/Application Support/Sublime Text 3/Installed Packages/Indent XML.sublime-package", line 49, in run
  File "indentxml in /Users/Novo/Library/Application Support/Sublime Text 3/Installed Packages/Indent XML.sublime-package", line 77, in indent
  File "indentxml in /Users/Novo/Library/Application Support/Sublime Text 3/Installed Packages/Indent XML.sublime-package", line 116, in indent
  File "./json/__init__.py", line 319, in loads
  File "./json/decoder.py", line 352, in decode
  File "./json/decoder.py", line 368, in raw_decode
  File "./json/scanner.py", line 38, in _scan_once
  File "./json/decoder.py", line 176, in JSONObject
ValueError: Expecting property name enclosed in double quotes: line 2 column 1 (char 2)
alek-sys commented 8 years ago

I don't think I can do anything without sample file