この文章はプログラマじゃない人向けに JSON を知ってもらうメリット、とくにAIとの効率的な対話方法を説明し、そしてあわよくばプログラマとも JSON の水準で会話してもらえたら嬉しい…というものです。 あなたは誰 UI を作るのが専門のエンジニアです。 エンジニア以外が使うノーコードのエディタを作ったりしてました プログラマじゃない人が JSON を知る利点 プログラマとして、プログラマじゃない人向けのノーコードなどを作っていたんですが、わかったことがあります。それは、「抽象的なロジックを記述するには訓練が必要だが、眼の前のデータとUIに対応したものは簡単に変更・記述できる」ということです。 自分の考える、もっとも成功したノーコードエディタこと Google Form JSON はよく知られているデータを記述する方法の一つです。特定の言語などとは関係ありません。 で、今現在 JSON
To parse JSON data in Swift, follow these two straightforward steps: Create one or more Decodable Swift types that match the structure of the JSON data; Decode the data using an instance of the JSONDecoder class. In this chapter: Creating decodable types that match the structure of your JSON data Let’s take, as an example, the following JSON data I took from the Rijksmuseum API, representing the W
JSON を行単位にわかりやすく展開してくれるコマンド gron がピンポイントでとても便利 2022-06-13-1 [Programming] コマンドラインでの JSON の操作には jq (軽量JSONパーサ)[2017-10-24-1] を使っています。万能で便利なんですが、奥まったところにある値だけを取りたいときとかちょっと面倒なんですよね。ちらっと値を見たいだけなのにおおげさになっちゃいがち。 ということで、 gron というのを使ってみました。 GitHub - tomnomnom/gron: Make JSON greppable!JSONをgrepしやすくするコマンドラインツールgronの紹介 - Qiitagronでjsonの扱いが楽になった話 – Tower of Engineers あ、これでいいや。 いわゆる「顧客(=私)が本当に必要だったもの」だわ。 例えば、
今日は13日の金曜日! ということでせっかくなのでJSONネタで The Gopher character is based on the Go mascot designed by Renée French. encoding/json GoにはJSONを扱う標準パッケージが含まれています。 encoding/json 3rd partyのJSONライブラリでも探してきて試そうかとも思ったのですがそれ以前に標準パッケージを全然把握していない自分に気付いたので、そちらを試すことにしました。 エンコード 手っ取り早くエンコードするにはMarshal関数を使います。インデント整形したい場合はMarshalIndentを使います。 structのエンコード structをJSONオブジェクトにエンコードします。 package main import ( "encoding/json" "log
TL;DR JSON Schemaを使ってこういうことが実現可能になった。 ダミーAPIサーバの提供 ドキュメントの自動生成 APIクライアントの動的定義 APIサーバのバリデータの動的定義 APIサーバのレスポンスの自動テスト JSON Schemaとは JSON SchemaというのはあるJSONのデータ構造を記述するための方法および書式の仕様で、 JSON SchemaもJSONで記述される。 これを利用すれば、リソースベースの(=RESTfulライクな)APIの仕様が簡便に記述できる。 例えば、我々のAPIはレシピとユーザというリソースを扱っていて、 それぞれCRUDのAPIを備えており、レシピはidとtitleとdescriptionという属性を持つ、 という旨をJSON Schemaで表現できる。 なんで最近ちょっと流行ってんの Mobile First、 Service Or
兼ねてから定期的に「JSON-LD」と「WebComponents」を勝手にプッシュしてたわけですが、ついにGoogleからのレコメンドがやってきました。 Google ウェブマスター向け公式ブログ: Web Compo […] 兼ねてから定期的に「JSON-LD」と「WebComponents」を勝手にプッシュしてたわけですが、ついにGoogleからのレコメンドがやってきました。 Google ウェブマスター向け公式ブログ: Web Components と JSON-LD でウェブサイト開発がより簡単に こんな記事見つけたら紹介しないわけにはいかないじゃないですか! というわけで記事を読んで感じたことやポイント・参考などをざざっと紹介します。 About JSON-LD まずは「JSON-LD」と「Web Components」についてです。 JSON-LDはJSONにschema.o
I'm still in the learning process of Go but am hitting a wall when it comes to JSON response arrays. Whenever I try to access a nested element of the "objects" array, Go throws (type interface {} does not support indexing) What is going wrong and how can I avoid making this mistake in the future? package main import ( "encoding/json" "fmt" ) func main() { payload := []byte(`{"query": "QEACOR139GID
I recently was investigating using a more lightweight JSON parser for iPhone projects (other than the standard SBJSON library) and came across the YAJL C JSON library. While using it as a document style parser didn’t result in a huge performance gain, it does a support a streaming “SAX” style parser which might help memory usage in larger documents. Hopefully, sometime soon I will do some performa
Overview Yet Another JSON Library. YAJL is a small event-driven (SAX-style) JSON parser written in ANSI C, and a small validating JSON generator. YAJL is released under the ISC license. Documentation Documentation generated by doxygen from source is available for v2.1.0, and for the previous stable release: v1.0.12. Code Get it on github: http://github.com/lloyd/yajl Support You can find Yajl on I
Google CodeでObjective-C用のJSON Frameworkが公開されているので、これを使ってTwitter等のJSONフィードを利用する方法をメモしておく(以下の内容は基本的にスタンフォード大学のiPhoneアプリ開発講座で学んだ事である)。 なお、上記のフレームワークのインストール方法、基本的な使用方法に関しては、以下のブログに詳しく書かれている。 [iPhone] JSON Framework の使い方(準備編) | Sun Limited Mt. [iPhone] JSON Framework の使い方(解析編) | Sun Limited Mt. ステップ1: TwitterのAPIドキュメントから取得したいJSON情報のURLを調べる まずTwitterの情報を取得してくる場合であるが、例えばあるユーザのつぶやきをJSONフォーマットで取得する場合、以下のよう
2.2 JSON (JavaScript Object Notation) is a lightweight data-interchange format. This framework provides two apis for parsing and generating JSON. One standard object-based and a higher level api consisting of categories added to existing Objective-C classes. This framework does its best to be as strict as possible, both in what it accepts and what it generates. For example, it does not support tra
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く