https://github.com/Songmu/jfill 標準入力からJSONを受け取り、その値を使ってコマンドラインを組み立てて実行するユーティリティです。以下のような具合です。 インストール % go get github.com/Songmu/jfill/cmd/jfill もしくはGitHub Releasesからご利用ください。 使い方 % echo '{"name":"jfill"}' | jfill echo Hello {{name}}! Hello jfill! {{name}} の部分がプレースホルダーです。それがJSONの入力を元に置換され実行されています。 プレースホルダー内には以下のようにデフォルト値を指定することも可能です。 % echo '{}' | jfill echo Hello {{name:jfill}}! Hello jfill! {{name
http { : log_format json escape=json '{"time": "$time_iso8601",' '"host": "$remote_addr",' '"vhost": "$host",' '"user": "$remote_user",' '"status": "$status",' '"protocol": "$server_protocol",' '"method": "$request_method",' '"path": "$request_uri",' '"req": "$request",' '"size": "$body_bytes_sent",' '"reqtime": "$request_time",' '"apptime": "$upstream_response_time",' '"ua": "$http_user_agent",'
Andrew Gerrand 25 January 2011 Introduction JSON (JavaScript Object Notation) is a simple data interchange format. Syntactically it resembles the objects and lists of JavaScript. It is most commonly used for communication between web back-ends and JavaScript programs running in the browser, but it is used in many other places, too. Its home page, json.org, provides a wonderfully clear and concise
« golang で画像アップロードが簡単に出来る go-imageupload を使ってみた。 | Main | SQLite3でカジュアルにズンドコキヨシ » コマンドラインから JSON を扱うツールとしては jq が一般的ですが、例えば ls を実行した結果を JSON の Array にしたいであったり、コマンドライン引数から簡単に Object を作りたいといった場合には一旦考え込まないといけないくらい使い方が難しかったりします。そんな中でひょいと現れたのが jo です。 GitHub - jpmens/jo: JSON output from a shell JSON output from a shell https://github.com/jpmens/jo 作者である jpmens さんがなぜ jo を作るに至ったかをブログに書いています。 Jan-Piet Mens
jq コマンドとは http://stedolan.github.io/jq/ JSONから簡単に値を抜き出したり、集計したり、整形して表示したりできるJSON用のgrepとかawkみたいなコマンドです。 WebサービスがJSONを吐いたり、AWS CLIが JSON を吐いたりする現代社会で大変便利なコマンドです。 マニュアル だいたいここ読めばOK. http://stedolan.github.io/jq/manual/ あ、これで、終わってしまう。だけど気にせず進めます。 簡単な例 まず、空気をつかみましょう。 以下jqコマンドの記法を見ていきます。JSON { "hoge": "value" } があった場合、 . がルート {} を表します。.hoge で "value" を表現します。だいたいこんな感じです。 ただの整形 しばらく下記のJSONを例に進めます。itemsには配
Resources What is Heroku? Help Customers Careers Events Podcasts Compliance Center Heroku is for Developers CTOs Team Collaboration Startups Enterprises Agencies Students See More Languages Node.js Ruby Java PHP Python Go Scala Clojure See More Latest News from the Heroku Blog Heroku Blog Find out what's new with Heroku on our blog. More news View all blog posts Editor's note: This is a cross post
jqとは? jqはawk、sedの様にテキストを整形/加工するためのコマンドで、JSON形式のテキストを整形/加工するの便利なコマンドです。おそらく一番多い使い方はJSONを入力値として受取り、必要な加工/整形処理を行ってJSON or テキストとして出力するという使い方でしょう。それ以外に、入力を受け取らずにjqでJSONを生成して出力するという使い方もできます。 このページでは、jqを初めて触るかた向けに一から使い方を解説します。 jqのインストール・セットアップ Linux、Mac(OS X)の場合には、32/64bitともにバイナリがダウンロードできますので、ダウンロードしてパスが通っているところに配置すればそのまま利用することができます。ダウンロードのリンクはこちらを参照してください。 Macの場合は以下の様にインストールできます。 curl -O "http://stedol
Andrew Gerrand 25 January 2011 Introduction JSON (JavaScript Object Notation) is a simple data interchange format. Syntactically it resembles the objects and lists of JavaScript. It is most commonly used for communication between web back-ends and JavaScript programs running in the browser, but it is used in many other places, too. Its home page, json.org, provides a wonderfully clear and concise
* Perl] CPANにあがってるJSON関連モジュール色々 JSON::XS とそれにまつわる歴史的な過去の話、まとめ。を読んで。昨日のお昼に某所でこの話題になって、Cpanel::JSON::XSやJSON::MaybeXSの話やらCPANにあがってるJSON関連のモジュールの話をしてました。せっかくだからモジュールの紹介をしてみようかと。 【追記】tokuhiromさんがツイートしてるように、今はJSONとJSON::XS/PPを使えば特に困ることはほとんどないと思います。 JSON::XS 後存知の通り、一番メジャーなXSモジュール。速い軽い。作者のリーマンさんが何かと話題になりますが、(割と)よい人です。あとjson_xsというコマンドツールがついてきて地味に便利。 JSON::PP JSON::XSと*ほぼ*完全な互換性を持ったPurePerlなモジュール。遅い重い。作者のま
To format and validate your JSON, just copy + paste it below: About the JSONLint EditorJSONLint is a validator and reformatter for JSON, a lightweight data-interchange format. Copy and paste, directly type, or input a URL in the editor above and let JSONLint tidy and validate your messy JSON code. What Is JSON?JSON (pronounced as Jason), stands for "JavaScript Object Notation," is a human-readable
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く