LoginSignup
0
1

More than 5 years have passed since last update.

JSON Lintの利用

Last updated at Posted at 2017-11-21

続き。
JSON Parserがないのに、DynamoDBのよくわからないJSON構造をちゃんと作るのは無理、ってことでJSON Lintを入れる。JSONLintを利用したいが、そのためにはnpmがいる。のために、node.jsをインストールする必要がある。

前準備

$curl --silent --location https://rpm.nodesource.com/setup_9.x | sudo bash -
$sudo yum install -y gcc-c++ make
$sudo yum install -y nodejs
$npm -v
5.5.1

実際のLintの利用

$npm install jsonlint
でインストール

$echo '{"id":{"N": "7"}, "type":{"S": "02"},"num":{"S": "aaa"}}' | jsonlint
{
  "id": {
    "N": "7"
  },
  "type": {
    "S": "02"
  },
  "num": {
    "S": "aaa"
  }
}

こんな感じ。

0
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1