python ์ด ๊น๋ ค์๋ค๋ฉด console ์ฐฝ์์ JSON ์ ๋ณด๊ธฐ ์ข์ ํํ๋ก print ํ ์ ์๋ค.
Python Version ์ 2.6 ์ด์ ์ด์ด์ผ ํ๋ค.
์๋์ ๋ช ๋ น์ด๋ฅผ ์ ๋ ฅํ๋ฉด ๋ณด๊ธฐ ์ข์ ํํ๋ก ๋ฐ๋๋ค.
echo 'YourJSONHere' | python3 -m json.tool{ "Resources" : { "HelloBucket" : { "Type" : "AWS::S3::Bucket", "Properties" : { "AccessControl" : "PublicRead", "WebsiteConfiguration" : { "IndexDocument" : "index.html", "ErrorDocument" : "error.html" } } } } }echo '{ "Resources" : { "HelloBucket" : { "Type" : "AWS::S3::Bucket", "Properties" : { "AccessControl" : "PublicRead", "WebsiteConfiguration" : { "IndexDocument" : "index.html", "ErrorDocument" : "error.html" } } } } }' | python3 -m json.tool๊ฒฐ๊ณผ๋ฌผ์ ์๋์ ๊ฐ๋ค.
{
"Resources": {
"HelloBucket": {
"Type": "AWS::S3::Bucket",
"Properties": {
"AccessControl": "PublicRead",
"WebsiteConfiguration": {
"IndexDocument": "index.html",
"ErrorDocument": "error.html"
}
}
}
}
}