Last active
December 28, 2017 16:13
-
-
Save kazgoto/1750e50dab1c32019298 to your computer and use it in GitHub Desktop.
Ruby One Liner to unescape unicode chars in JSON
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
cat unicode-escaped.json | ruby -ne 'puts $_.gsub(/\\u([\da-fA-F]{4})/) { [$1].pack("H*").unpack("n*").pack("U*") }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment