Last active
August 29, 2015 14:06
-
-
Save bigwheel/ba54d09e9276426a03ce to your computer and use it in GitHub Desktop.
This file contains 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
# play-jsonからhoconフォーマットへだいたい変換するスクリプト | |
# Seqだけはカッコが同一行へ存在しないと変換を失敗する | |
sed -i -e 's/Json.obj(/{/g' $1 | |
sed -i -e 's/ -> /: /g' $1 | |
sed -i -e 's/,$//g' $1 | |
sed -i -e 's/Seq(\(.*\))/[\1]/g' $1 | |
sed -i -e 's/L$//g' $1 | |
sed -i -e 's/)/}/g' $1 | |
sed -i -e 's/^\(\s*\)"\([^"]*\)"/\1\2/g' $1 | |
sed -i -e 's/JsNull/null/g' $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment