Last active
October 12, 2015 22:13
-
-
Save rahul286/213cb6dc83019aeb8858 to your computer and use it in GitHub Desktop.
Fixing invalid json files created by Ning Archiver tool
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## MAC OSX users, please note that following codes won't work with BSD based sed implementation. | |
## You can get GNU Mac- `brew install gnu-sed --default-names` | |
sed -i -e '1s/^.//' ning* | |
sed -i -e '$s/.$//' ning* | |
sed -i -e 's/}{/},{/g' ning* | |
sed -i -e 's/}]{/},{/g' ning* | |
## extra: to verify if files are valid JSON filesmm run jsonlint | |
## To install `npm install jsonlint -g` | |
jsonlint -q *.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment