PHPでJSONのデータを処理する方法

PHPでJSONのデータを処理する方法

webサービスのAPIを利用していると、必ずと言っていいほど取り扱うことになるJSONのデータ。「これってどうやって処理すればいいの?」という人のため、そして、忘れやすい自分自身のために、その処理方法をまとめてみました。サンプル言語はPHPです。

JSONとは?

JavaScript Object Notation

「JSONとは何か?」について、簡単に説明します。JSONという文字を見て「13日の金曜日」を思い浮かべてしまう人は、まずはその過ちに気付いて下さい。JSONとはJavaScript Object Notationの頭文字を繋げ合わせたものです。Notationは日本語で「表記法」。JavaScriptのオブジェクトの表記法を元にした、データフォーマットです。要はJavaScriptのオブジェクトみたいなデータ形式ですね。

様々なプログラム言語が対応している

JSONの最大の特徴は、例えばJavaScript、PHP、Rubyというような様々なプログラム言語がその取り扱いに対応していることです。データを用意する側は、JSONという形式のデータ1種類を用意しておくだけで、JavaScriptを使う人、PHPを使う人、Rubyを使う人などに対応することができるというわけですね。「PHPで受け取ったデータを、JavaScriptで処理する」なんていうシーンでも、JSONをそのまま渡せばいいだけなので、とっても楽チンです。

JSONのデータ構造

JSONはオブジェクトと配列の2種類が混ぜ合わさってできているものと考えると、最初は掴みやすいと思います。オブジェクト形式と配列形式の2種類を意識して下さい。「オブジェクト」と「配列」です。オブジェクトは{...}で囲み、配列は[...]で囲みます。

オブジェクト

JSONは多くの場合、次のように、「キーと値」のペアで成り立っています。「キーと値」は"キー": "値"というようにコロン(:)で区切られます。そして、ペアとペアの間はカンマ(,)で区切られます。全体は{...}で囲まれます。この{...}をオブジェクト(形式)と表現します。次のサンプルは、4つのペアが詰まったJSON(オブジェクト)です。

JSON

{
	"name": "あらゆ",
	"birthday": "1982-02-06",
	"gender": "male",
	"greeting": "こんにちは〜〜。"
}

値がオブジェクトで表現される場合があります。例えば、次のサンプルではprofileというキーの値が、「name=Syncer」「published=20140610」というデータになっています。値はオブジェクトなので波括弧({...})で囲みます。

JSON

{
	"type": "Blog",
	"profile": {
		"name": "Syncer",
		"published": "2014-06-10"
	}
}

配列

値が複数ある場合、値を角括弧([...])で囲み、その中にカンマ(,)で区切った複数の値を配列形式で格納することができます。下記サンプルでは、hobbyの値がインターネットラーメン旅行の3つですね。配列なので、中身は値だけで成り立っていなければいけません。

JSON

{
	"hobby": [
		"インターネット",
		"ラーメン",
		"旅行"
	]
}

JSONが複数の値だけで成り立っている場合は、当然、全体は角括弧([...])で囲まれています。

JSON

[
	"インターネット",
	"ラーメン",
	"旅行"
]

次は、キーがないオブジェクトが、配列になっているJSONです。1つ1つのオブジェクトにはキーがないですよね。だから、配列なので全体は角括弧([...])で囲まれています。

JSON

[
	{
		"date": "2014-07-10",
		"weather": "晴れ"
	},
	{
		"date": "2014-07-11",
		"weather": "雨"
	}
]

JSONを作成する方法

配列をJSONにエンコードする

PHPでJSONを作成する最も簡単な方法は、json_encode()という関数を利用して、配列をJSONに変換(エンコード)することです。例えば、次のように、連想配列をJSONに変換することができます。

PHP

// 連想配列($array)
$array = array(
	"name" => "あらゆ" ,
	"gender" => "男" ,
	"blog" => array(
		"name" => "SYNCER" ,
		"published" => "2014-06-10" ,
		"url" => "https://syncer.jp/" ,
	),
);

// 連想配列($array)をJSONに変換(エンコード)する
$json = json_encode( $array ) ;

$jsonの中身は次の通り、連想配列がJSONに変換されたデータとなっています。といっても、改行とインデントがないので見難いですよね…。困りました。

JSON

{"name":"\u3042\u3089\u3086","gender":"\u7537","blog":{"name":"Syncer","published":"2014-06-10","url":"http:\/\/syncer.jp\/"}}

改行とインデント (Pretty Print)

json_encode()の第2引数に、JSON_PRETTY_PRINTという定数を指定すると、次のように自動的に改行とインデントが付きます。ただし、この引数が利用できるのは、PHPのバージョンが5.4.0以上の環境のみです。

PHP

// 連想配列($array)をJSONに変換(エンコード)する
$json = json_encode( $array , JSON_PRETTY_PRINT ) ;

JSON

{
	"name": "\u3042\u3089\u3086",
	"gender": "\u7537",
	"blog": {
		"name": "SYNCER",
		"published": "2014-06-10",
		"url": "https:\/\/syncer.jp\/"
	}
}

ユニコード・エスケープ

JSONはUnicodeという文字コードなので、あらゆ\u3042\u3089\u3086というように表現されていますね。これが見難い場合は、第2引数にJSON_UNESCAPED_UNICODEを指定することで、Unicodeにエンコードしないようにできます。PHPのバージョンが5.4.0以上の環境でのみ有効です。なお、引数が複数ある場合はバーティカルバー(|)で区切ります。

PHP

// 連想配列($array)をJSONに変換(エンコード)する
$json = json_encode( $array , JSON_PRETTY_PRINT ) ;

JSON

{
	"name": "あらゆ",
	"gender": "男",
	"blog": {
		"name": "SYNCER",
		"published": "2014-06-10",
		"url": "https:\/\/syncer.jp\/"
	}
}

スラッシュ・エスケープ

もう1つ、URLの値を見ると、スラッシュ(/)がエスケープされています。これを確認などのために外したい場合は、JSON_UNESCAPED_SLASHESを第2引数に指定して下さい。PHPのバージョンが5.4.0以上の環境でのみ有効です。

PHP

// 連想配列($array)をJSONに変換(エンコード)する
$json = json_encode( $array , JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES ) ;

JSON

{
	"name": "あらゆ",
	"gender": "男",
	"blog": {
		"name": "SYNCER",
		"published": "2014-06-10",
		"url": "https://syncer.jp/"
	}
}

JSONから値を取り出す方法

JSONをデコードする

続いて、この章ではJSONから値を取り出す方法を紹介します。PHPの場合、JSONはそのままでは扱えません。一度、json_decode()という関数を利用して「オブジェクト型(stdClass)」、または「配列型(Array)」に変換(デコード)する必要があります。この章では、2通りの方法を見てきましょう。なお、下記のJSONをサンプルで取り扱います。

JSON

{
	"name": "あらゆ",
	"gender": "男",
	"blog": {
		"name": "SYNCER",
		"published": "2014-06-10",
		"category": [
			"旅行",
			"温泉",
			"ドライブ"
		]
	}
}

配列型

JSONを配列に直してから扱う方法です。それには、json_decode()という関数を利用します。第2引数にはBoolean値のtrueを指定して下さい。すると、下のコードの通り、JSONと同じ構造の配列に変換されます。例えば「あらゆ」という値を取り出したい時は、$array["name"]でキーにアクセスできるというわけです。「Syncer」なら$array["blog"]["name"]ですね〜。「温泉」なら$array["blog"]["category"][1]となります。

PHP

// JSON($json)を連想配列に変換(デコード)する
$array = json_decode( $json , true ) ;

PHP

// [$array]の中身
Array
(
	[name] => あらゆ
	[gender] => 男
	[blog] => Array
		(
			[name] => SYNCER
			[published] => 2014-06-10
			[category] => Array
				(
					[0] => 旅行
					[1] => 温泉
					[2] => ドライブ
				)
		)
)

オブジェクト型

json_decode()の第2引数をBoolean値のfalse、または指定しない場合は、JSONが連想配列ではなく、stdClassのオブジェクト型に変換されます。当然、その構造はJSONと同じです。連想配列との違いは、キーにアクセスする際、アロー演算子(->)を用いることです。例えば、「あらゆ」という値を取り出したい時は、$obj->name、「Syncer」という値を取り出したい時は、$obj->blog->nameというようにアクセスします。「温泉」なら$array->blog->category[1]となります。

PHP

// JSON($json)をstdClassのオブジェクト型に変換(デコード)する
$obj = json_decode( $json , false ) ;

PHP

// [$obj]の中身
stdClass Object
(
	[name] => あらゆ
	[gender] => 男
	[blog] => stdClass Object
		(
			[name] => SYNCER
			[published] => 2014-06-10
			[category] => Array
				(
					[0] => 旅行
					[1] => 温泉
					[2] => ドライブ
				)
		)
)

練習してみよう

配列型もオブジェクト型でも、値の取り出し方は一緒です。例えば、下記のような複雑な構造のJSONがあった場合に、キーにどうやってアクセスするかを考えてみると、慣れが速いと思います。

JSON

{
	"japan": [
		{
			"tokyo": [
				"渋谷",
				{
					"city": "歌舞伎町"
				},
				"足立区"
			]
		}
	]
}

この場合、配列型、オブジェクト型での、「渋谷」「歌舞伎町」「足立区」、それぞれの値の取り出し方は下記の通りです。確認してみて下さいね。オブジェクト({...})なのか、配列([...])なのかを意識しましょう。

PHP

// JSONは[$json]に格納されていると仮定

// 配列型の場合
$array = json_decode( $json , true ) ;
$array["japan"][0]["tokyo"][0] ;		// 渋谷
$array["japan"][0]["tokyo"][1]["city"] ;	// 歌舞伎町
$array["japan"][0]["tokyo"][2] ;		// 足立区

// オブジェクト型の場合
$obj = json_decode( $json ) ;
$obj->japan[0]->tokyo[0] ;	// 渋谷
$obj->japan[0]->tokyo[1]->city ;	// 歌舞伎町
$obj->japan[0]->tokyo[2] ;	// 足立区

ループ処理

配列の各値に対して、一括で処理をしたい場合は、ループ処理を行ないましょう。例えば、「あらゆ」「男」というそれぞれの値を、〜...〜で囲みたい場合を考えてみましょう。

JSON

{
	"name": "あらゆ",
	"gender": "男"
}

PHP

// JSONは[$json]に格納されていると仮定

// 配列型の場合
$array = json_decode( $json , true ) ;

// ループ処理
foreach( $array as $key => $value )
{
	// [$key]には「name→gender」が入る
	// [$value]には「あらゆ→男」が入る

	// $obj["name"]→$obj["gender"]の値を指定
	$array[$key] = "〜".$value."〜" ;
}

// オブジェクト型の場合
$obj = json_decode( $json ) ;

// ループ処理
foreach( $obj as $key => $value )
{
	// [$key]には「name→gender」が入る
	// [$value]には「あらゆ→男」が入る

	// [$obj->name]→[$obj->gender]の値を指定
	$obj->{$key} = "〜".$value."〜" ;
}

特殊文字が入ったキー

ここからは上級編です。webサイトによっては、例えば、キーにドルマーク($)などの特殊文字が入っている場合があります。

JSON

{
	"$name": "あらゆ",
	"$gender": "男"
}

PHP

// JSONは[$json]に格納されていると仮定

// 配列型の場合
$array = json_decode( $json,true ) ;
$array['$name'] ;	// あらゆ
$array['$gender'] ;	// 男

// オブジェクト型の場合
$obj = json_decode( $json ) ;
$obj->{'$name'} ;	// あらゆ
$obj->{'$gender'} ;	// 男

キーを変数で指定する

使う場面は限られますが、キーを変数で指定することも可能です。その場合、波括弧({...})と二重引用符(")を用います。キーを変数名で指定する必要性があった場合、思い出して下さい。

PHP

// JSONは[$json]に格納されていると仮定

// キーの名前を変数で指定する
$key = "name" ;

// 配列型の場合
$array = json_decode( $json , true ) ;
$array[ $key ] ;	// あらゆ

// オブジェクト型の場合
$obj = json_decode( $json ) ;
$obj->{"$key"} ;	// あらゆ

JSONを適切に出力する

純粋にJSONだけを出力する、データ参照用のPHPプログラムを作る場合、出力時に「このデータ(Content-Type)はJSONですよ」と知らせるためのヘッダーを指定することで、より動作が安定します。header()を利用して、次のように行ないましょう。

PHP

<?php
	// ヘッダーを指定
	header( "Content-Type: application/json; charset=utf-8" ) ;

	// JSONを出力
	echo $json ;

JSONビューアを使おう

JSONは構造を把握すれば、容易に値を取り出すことができるのが、お分かりいただけたと思います。構造を把握するには、階層ごとに開閉できるビューアを使うと捗ります。例えば、先ほどの練習用に提示した複雑な構造のJSONをビューアにかけると次のようになります。右上のボタンや、各プロパティの左にある+-を使って、開閉することができます。

JSON

{
	"japan": [
		{
			"tokyo": [
				"渋谷",
				{
					"city": "歌舞伎町"
				},
				"足立区"
			]
		}
	]
}

いかがでしょう?これなら、簡単に構造を把握できますよね。Twitterなど、APIを利用して取得するJSONは、時に膨大な量になって、純粋な目視で構造を解析してたら、目に負担がかかるか、もしくはストレスで精神に負担がかかりますよね…。よろしかったら、JSONを入力すると、それをビューアで表示する下記サービスを活用してみて下さい。

日本語が特殊文字にエンコードされてしまう!?

JSON内の日本語が、例えば\u3068\u304b\u30b8というように、特殊な文字にエンコードされてしまうので、戸惑う方がいるかもしれません。これは、ユニコード文字といって、データをJSON形式に変換する場合に、自動的に行なわれる処理で、特に気にする必要はありません。というのも、デコード処理(PHPならjson_decode())をして、ブラウザに出力すれば、再び、読める日本語文字として変換されるからです。

ウェブサービスのJSONを見てみよう

APIを利用して、取得できるJSONの例を紹介します。

Twitterの場合

Twitterのつぶやき、2件分を取得した時のJSONデータです。1件ごとのつぶやきが、配列となって構成されているのが分かると思います。比較的、構造を把握しやすい、開発者に易しいデータですね。

JSON

[{"created_at":"Fri Mar 06 06:36:16 +0000 2015","id":573733819292876800,"id_str":"573733819292876800","text":"WOEID\u3068\u304b\u30b8\u30aa\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u306f\u5730\u540d\u306e\u82f1\u8a33\u306b\u3082\u4fbf\u5229\u3060\u3063\u305f\u308a\u3059\u308b\u3002\nhttp:\/\/t.co\/j3UoTLgb0V","source":"\u003ca href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003eTwitter Web Client\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":1528352858,"id_str":"1528352858","name":"\u3042\u3089\u3086","screen_name":"arayutw","location":"Japan","profile_location":null,"description":"\u4e3b\u306b\u767a\u4fe1\u7528\u3068\u3057\u3066\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u30c4\u30a4\u30b5\u30fc\u3068\u3044\u3046\u30b5\u30fc\u30d3\u30b9\u4f5c\u308a\u307e\u3057\u305f\u2192http:\/\/t.co\/xfQfllJsXK","url":"http:\/\/t.co\/ScEV7BMNgZ","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/ScEV7BMNgZ","expanded_url":"http:\/\/syncer.jp","display_url":"syncer.jp","indices":[0,22]}]},"description":{"urls":[{"url":"http:\/\/t.co\/xfQfllJsXK","expanded_url":"http:\/\/syncer.jp\/twitter-search","display_url":"syncer.jp\/twitter-search","indices":[33,55]}]}},"protected":false,"followers_count":663,"friends_count":349,"listed_count":18,"created_at":"Tue Jun 18 17:28:51 +0000 2013","favourites_count":1640,"utc_offset":32400,"time_zone":"Tokyo","geo_enabled":true,"verified":false,"statuses_count":7393,"lang":"ja","contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"292F33","profile_background_image_url":"http:\/\/abs.twimg.com\/images\/themes\/theme12\/bg.gif","profile_background_image_url_https":"https:\/\/abs.twimg.com\/images\/themes\/theme12\/bg.gif","profile_background_tile":false,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/546567973238874113\/-8lsC1OT_normal.png","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/546567973238874113\/-8lsC1OT_normal.png","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/1528352858\/1419139790","profile_link_color":"D36015","profile_sidebar_border_color":"F2E195","profile_sidebar_fill_color":"FFF7CC","profile_text_color":"0C3E53","profile_use_background_image":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorite_count":0,"entities":{"hashtags":[],"symbols":[],"user_mentions":[],"urls":[{"url":"http:\/\/t.co\/j3UoTLgb0V","expanded_url":"http:\/\/syncer.jp\/how-to-use-geocoding-api","display_url":"syncer.jp\/how-to-use-geo\u2026","indices":[33,55]}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"ja"},{"created_at":"Fri Mar 06 06:31:59 +0000 2015","id":573732738848591872,"id_str":"573732738848591872","text":"\u7def\u5ea6\u7d4c\u5ea6(http:\/\/t.co\/9i39XcjqTb)\u2192WOEID(http:\/\/t.co\/SmbaW4kfSL)\u2192IP GeoLocation(http:\/\/t.co\/CCycs6ns2w)\u3068\u3051\u3063\u3053\u3046\u6bb5\u968e\u8e0f\u3093\u3067\u308b\u3002","source":"\u003ca href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003eTwitter Web Client\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":1528352858,"id_str":"1528352858","name":"\u3042\u3089\u3086","screen_name":"arayutw","location":"Japan","profile_location":null,"description":"\u4e3b\u306b\u767a\u4fe1\u7528\u3068\u3057\u3066\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u30c4\u30a4\u30b5\u30fc\u3068\u3044\u3046\u30b5\u30fc\u30d3\u30b9\u4f5c\u308a\u307e\u3057\u305f\u2192http:\/\/t.co\/xfQfllJsXK","url":"http:\/\/t.co\/ScEV7BMNgZ","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/ScEV7BMNgZ","expanded_url":"http:\/\/syncer.jp","display_url":"syncer.jp","indices":[0,22]}]},"description":{"urls":[{"url":"http:\/\/t.co\/xfQfllJsXK","expanded_url":"http:\/\/syncer.jp\/twitter-search","display_url":"syncer.jp\/twitter-search","indices":[33,55]}]}},"protected":false,"followers_count":663,"friends_count":349,"listed_count":18,"created_at":"Tue Jun 18 17:28:51 +0000 2013","favourites_count":1640,"utc_offset":32400,"time_zone":"Tokyo","geo_enabled":true,"verified":false,"statuses_count":7393,"lang":"ja","contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"292F33","profile_background_image_url":"http:\/\/abs.twimg.com\/images\/themes\/theme12\/bg.gif","profile_background_image_url_https":"https:\/\/abs.twimg.com\/images\/themes\/theme12\/bg.gif","profile_background_tile":false,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/546567973238874113\/-8lsC1OT_normal.png","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/546567973238874113\/-8lsC1OT_normal.png","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/1528352858\/1419139790","profile_link_color":"D36015","profile_sidebar_border_color":"F2E195","profile_sidebar_fill_color":"FFF7CC","profile_text_color":"0C3E53","profile_use_background_image":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorite_count":0,"entities":{"hashtags":[],"symbols":[],"user_mentions":[],"urls":[{"url":"http:\/\/t.co\/9i39XcjqTb","expanded_url":"http:\/\/syncer.jp\/check-latitude-and-longitude","display_url":"syncer.jp\/check-latitude\u2026","indices":[5,27]},{"url":"http:\/\/t.co\/SmbaW4kfSL","expanded_url":"http:\/\/syncer.jp\/woeid-lookup","display_url":"syncer.jp\/woeid-lookup","indices":[35,57]},{"url":"http:\/\/t.co\/CCycs6ns2w","expanded_url":"http:\/\/syncer.jp\/ip-checker","display_url":"syncer.jp\/ip-checker","indices":[74,96]}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"ja"}]

Googleの場合

GoogleのPicasaの写真データを2件分、取得した時のサンプルです。Twitterと比べて、かなり複雑なのが分かると思います。初見では、どこに写真のデータがあるのか発見するのに時間がかかるでしょう。JSONの扱いに慣れてきたら、色々なウェブサービスのAPIを利用してみて下さいね。

JSON

{"version":"1.0","encoding":"UTF-8","feed":{"xmlns":"http://www.w3.org/2005/Atom","xmlns$openSearch":"http://a9.com/-/spec/opensearchrss/1.0/","xmlns$gphoto":"http://schemas.google.com/photos/2007","xmlns$exif":"http://schemas.google.com/photos/exif/2007","xmlns$media":"http://search.yahoo.com/mrss/","xmlns$georss":"http://www.georss.org/georss","xmlns$gml":"http://www.opengis.net/gml","id":{"$t":"https://picasaweb.google.com/data/feed/api/user/114918692417332410369/albumid/6067907905774112945"},"updated":{"$t":"2015-03-03T09:11:54.456Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://schemas.google.com/photos/2007#album"}],"title":{"$t":"高知県旅行","type":"text"},"subtitle":{"$t":"","type":"text"},"rights":{"$t":"public","type":"text"},"icon":{"$t":"https://lh3.googleusercontent.com/-JmN3Sh0VYj8/VDWKF1VzULE/AAAAAAAAFiQ/FZP-S_H2frs/s160-c/KOXssI.jpg"},"link":[{"rel":"http://schemas.google.com/g/2005#feed","type":"application/atom+xml","href":"https://picasaweb.google.com/data/feed/api/user/114918692417332410369/albumid/6067907905774112945?alt=json"},{"rel":"alternate","type":"text/html","href":"https://picasaweb.google.com/114918692417332410369/KOXssI"},{"rel":"http://schemas.google.com/photos/2007#slideshow","type":"application/x-shockwave-flash","href":"https://photos.gstatic.com/media/slideshow.swf?host=picasaweb.google.com&RGB=0x000000&feed=https://picasaweb.google.com/data/feed/api/user/114918692417332410369/albumid/6067907905774112945?alt%3Drss"},{"rel":"http://schemas.google.com/photos/2007#report","type":"text/html","href":"https://picasaweb.google.com/lh/reportAbuse?uname=114918692417332410369&aid=6067907905774112945"},{"rel":"self","type":"application/atom+xml","href":"https://picasaweb.google.com/data/feed/api/user/114918692417332410369/albumid/6067907905774112945?alt=json&start-index=1&max-results=2&kind=photo&imgmax=600c&thumbsize=160"},{"rel":"next","type":"application/atom+xml","href":"https://picasaweb.google.com/data/feed/api/user/114918692417332410369/albumid/6067907905774112945?alt=json&start-index=3&max-results=2&kind=photo&imgmax=600c&thumbsize=160"}],"author":[{"name":{"$t":"Yuta Arai"},"uri":{"$t":"https://picasaweb.google.com/114918692417332410369"}}],"generator":{"$t":"Picasaweb","version":"1.00","uri":"http://picasaweb.google.com/"},"openSearch$totalResults":{"$t":20},"openSearch$startIndex":{"$t":1},"openSearch$itemsPerPage":{"$t":2},"gphoto$id":{"$t":"6067907905774112945"},"gphoto$name":{"$t":"KOXssI"},"gphoto$location":{"$t":""},"gphoto$access":{"$t":"public"},"gphoto$timestamp":{"$t":"1412794903000"},"gphoto$numphotos":{"$t":20},"gphoto$user":{"$t":"114918692417332410369"},"gphoto$nickname":{"$t":"Yuta Arai"},"gphoto$allowPrints":{"$t":"true"},"gphoto$allowDownloads":{"$t":"true"},"entry":[{"id":{"$t":"https://picasaweb.google.com/data/entry/api/user/114918692417332410369/albumid/6067907905774112945/photoid/6067908500331755362?alt=json"},"published":{"$t":"2014-10-08T19:04:01.000Z"},"updated":{"$t":"2014-10-08T19:06:34.011Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://schemas.google.com/photos/2007#photo"}],"title":{"$t":"IMG_5276.JPG","type":"text"},"summary":{"$t":"はりまや橋","type":"text"},"content":{"type":"image/jpeg","src":"https://lh3.googleusercontent.com/-dtOEIUHh590/VDWKocPY92I/AAAAAAAAFck/FFYLDN6n2zo/s600-c/IMG_5276.JPG"},"link":[{"rel":"http://schemas.google.com/g/2005#feed","type":"application/atom+xml","href":"https://picasaweb.google.com/data/feed/api/user/114918692417332410369/albumid/6067907905774112945/photoid/6067908500331755362?alt=json"},{"rel":"alternate","type":"text/html","href":"https://picasaweb.google.com/114918692417332410369/KOXssI#6067908500331755362"},{"rel":"http://schemas.google.com/photos/2007#canonical","type":"text/html","href":"https://picasaweb.google.com/lh/photo/-gHJXf24kuObD2XZvlzUGNMTjNZETYmyPJy0liipFm0"},{"rel":"self","type":"application/atom+xml","href":"https://picasaweb.google.com/data/entry/api/user/114918692417332410369/albumid/6067907905774112945/photoid/6067908500331755362?alt=json"},{"rel":"http://schemas.google.com/photos/2007#report","type":"text/html","href":"https://picasaweb.google.com/lh/reportAbuse?uname=114918692417332410369&aid=6067907905774112945&iid=6067908500331755362"}],"gphoto$id":{"$t":"6067908500331755362"},"gphoto$version":{"$t":"4"},"gphoto$position":{"$t":42.0},"gphoto$albumid":{"$t":"6067907905774112945"},"gphoto$access":{"$t":"public"},"gphoto$width":{"$t":"2048"},"gphoto$height":{"$t":"1536"},"gphoto$size":{"$t":"975406"},"gphoto$client":{"$t":"es-pc-add-photos"},"gphoto$checksum":{"$t":""},"gphoto$timestamp":{"$t":"1409269094000"},"gphoto$imageVersion":{"$t":"5577"},"gphoto$commentingEnabled":{"$t":"true"},"gphoto$commentCount":{"$t":0},"gphoto$streamId":[{"$t":"shared_group_6067908500331755362"}],"gphoto$license":{"$t":"ALL_RIGHTS_RESERVED","id":0,"name":"著作権をすべて留保する","url":""},"gphoto$shapes":{"faces":"done"},"exif$tags":{"exif$fstop":{"$t":"2.4"},"exif$make":{"$t":"Apple"},"exif$model":{"$t":"iPhone 5"},"exif$exposure":{"$t":"0.0067114094"},"exif$flash":{"$t":"false"},"exif$focallength":{"$t":"4.12"},"exif$iso":{"$t":"50"},"exif$time":{"$t":"1409301494000"},"exif$imageUniqueID":{"$t":"cfb4828a08f09bcb0000000000000000"}},"media$group":{"media$content":[{"url":"https://lh3.googleusercontent.com/-dtOEIUHh590/VDWKocPY92I/AAAAAAAAFck/FFYLDN6n2zo/s600-c/IMG_5276.JPG","height":600,"width":600,"type":"image/jpeg","medium":"image"}],"media$credit":[{"$t":"Yuta Arai"}],"media$description":{"$t":"はりまや橋","type":"plain"},"media$keywords":{},"media$thumbnail":[{"url":"https://lh3.googleusercontent.com/-dtOEIUHh590/VDWKocPY92I/AAAAAAAAFck/FFYLDN6n2zo/s160-c/IMG_5276.JPG","height":160,"width":160}],"media$title":{"$t":"IMG_5276.JPG","type":"plain"}},"georss$where":{"gml$Point":{"gml$pos":{"$t":"33.5600083 133.5426944"}}}},{"id":{"$t":"https://picasaweb.google.com/data/entry/api/user/114918692417332410369/albumid/6067907905774112945/photoid/6067908530824189058?alt=json"},"published":{"$t":"2014-10-08T19:04:08.000Z"},"updated":{"$t":"2015-03-03T09:11:54.456Z"},"category":[{"scheme":"http://schemas.google.com/g/2005#kind","term":"http://schemas.google.com/photos/2007#photo"}],"title":{"$t":"IMG_5279.JPG","type":"text"},"summary":{"$t":"はりまや橋のそばにあったアンパンマンの石像。","type":"text"},"content":{"type":"image/jpeg","src":"https://lh4.googleusercontent.com/-GaFllA770qk/VDWKqN1WlII/AAAAAAAAFcw/3wO_iZJoAWA/s600-c/IMG_5279.JPG"},"link":[{"rel":"http://schemas.google.com/g/2005#feed","type":"application/atom+xml","href":"https://picasaweb.google.com/data/feed/api/user/114918692417332410369/albumid/6067907905774112945/photoid/6067908530824189058?alt=json"},{"rel":"alternate","type":"text/html","href":"https://picasaweb.google.com/114918692417332410369/KOXssI#6067908530824189058"},{"rel":"http://schemas.google.com/photos/2007#canonical","type":"text/html","href":"https://picasaweb.google.com/lh/photo/_rUUxcQed6D_bVk9MqbEeNMTjNZETYmyPJy0liipFm0"},{"rel":"self","type":"application/atom+xml","href":"https://picasaweb.google.com/data/entry/api/user/114918692417332410369/albumid/6067907905774112945/photoid/6067908530824189058?alt=json"},{"rel":"http://schemas.google.com/photos/2007#report","type":"text/html","href":"https://picasaweb.google.com/lh/reportAbuse?uname=114918692417332410369&aid=6067907905774112945&iid=6067908530824189058"}],"gphoto$id":{"$t":"6067908530824189058"},"gphoto$version":{"$t":"4"},"gphoto$position":{"$t":43.0},"gphoto$albumid":{"$t":"6067907905774112945"},"gphoto$access":{"$t":"public"},"gphoto$width":{"$t":"2048"},"gphoto$height":{"$t":"1536"},"gphoto$size":{"$t":"965607"},"gphoto$client":{"$t":"es-pc-add-photos"},"gphoto$checksum":{"$t":""},"gphoto$timestamp":{"$t":"1409269139000"},"gphoto$imageVersion":{"$t":"5580"},"gphoto$commentingEnabled":{"$t":"true"},"gphoto$commentCount":{"$t":0},"gphoto$streamId":[{"$t":"shared_group_6067908530824189058"}],"gphoto$license":{"$t":"ALL_RIGHTS_RESERVED","id":0,"name":"著作権をすべて留保する","url":""},"gphoto$shapes":{"faces":"done"},"exif$tags":{"exif$fstop":{"$t":"2.4"},"exif$make":{"$t":"Apple"},"exif$model":{"$t":"iPhone 5"},"exif$exposure":{"$t":"0.0024937657"},"exif$flash":{"$t":"false"},"exif$focallength":{"$t":"4.12"},"exif$iso":{"$t":"50"},"exif$time":{"$t":"1409301539000"},"exif$imageUniqueID":{"$t":"08fce77c8f6cb25d0000000000000000"}},"media$group":{"media$content":[{"url":"https://lh4.googleusercontent.com/-GaFllA770qk/VDWKqN1WlII/AAAAAAAAFcw/3wO_iZJoAWA/s600-c/IMG_5279.JPG","height":600,"width":600,"type":"image/jpeg","medium":"image"}],"media$credit":[{"$t":"Yuta Arai"}],"media$description":{"$t":"はりまや橋のそばにあったアンパンマンの石像。","type":"plain"},"media$keywords":{},"media$thumbnail":[{"url":"https://lh4.googleusercontent.com/-GaFllA770qk/VDWKqN1WlII/AAAAAAAAFcw/3wO_iZJoAWA/s160-c/IMG_5279.JPG","height":160,"width":160}],"media$title":{"$t":"IMG_5279.JPG","type":"plain"}},"georss$where":{"gml$Point":{"gml$pos":{"$t":"33.5598249 133.5428611"}}}}]}}