Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# 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
You can’t perform that action at this time.