JSON-LD

JSON for Linking Data

{
  "@context": "http://schema.org/",
  "@type": "Person",
  "name": "Dca Hsu",
  "born": "1988-07-13",
  "telephone": "(0912) 110-713",
  "url": "http://github.com/dca",
  "spouse": null
}

JSON-LD

這是一個偶然的相遇

那 Data 呢?

網頁、郵件、事件、地點、某種特定資料... 等等

我們有各種資料

{
  "login": "octocat",
  "id": 1,
  "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  "gravatar_id": "",
  "url": "https://api.github.com/users/octocat",
  "html_url": "https://github.com/octocat",
  "followers_url": "https://api.github.com/users/octocat/followers",
  "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  "organizations_url": "https://api.github.com/users/octocat/orgs",
  "repos_url": "https://api.github.com/users/octocat/repos",
  "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  "received_events_url": "https://api.github.com/users/octocat/received_events",
  "type": "User",
  "site_admin": false,
  "name": "monalisa octocat",
  "company": "GitHub",
  "blog": "https://github.com/blog",
  "location": "San Francisco",
  "email": "octocat@github.com",
  "hireable": false,
  "bio": "There once was...",
  "public_repos": 2,
  "public_gists": 1,
  "followers": 20,
  "following": 0,
  "created_at": "2008-01-14T04:33:35Z",
  "updated_at": "2008-01-14T04:33:35Z"
}
{
  "profile_sidebar_fill_color": "F8FCF2",
  "profile_sidebar_border_color": "547980",
  "profile_background_tile": true,
  "name": "Ryan Sarver",
  "profile_image_url": "http://a0.twimg.com/profile_images/1777569006/image1327396628_normal.png",
  "created_at": "Mon Feb 26 18:05:55 +0000 2007",
  "location": "San Francisco, CA",
  "follow_request_sent": false,
  "profile_link_color": "547980",
  "is_translator": false,
  "id_str": "795649",
  "default_profile": false,
  "contributors_enabled": true,
  "favourites_count": 3162,
  "url": null,
  "profile_image_url_https": "https://si0.twimg.com/profile_images/1777569006/image1327396628_normal.png",
  "utc_offset": -28800,
  "id": 795649,
  "profile_use_background_image": true,
  "listed_count": 1586,
  "profile_text_color": "594F4F",
  "lang": "en",
  "followers_count": 276334,
  "protected": false,
  "notifications": true,
  "profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/113854313/xa60e82408188860c483d73444d53e21.png",
  "profile_background_color": "45ADA8",
  "verified": false,
  "geo_enabled": true,
  "time_zone": "Pacific Time (US & Canada)",
  "description": "Director, Platform at Twitter. Detroit and Boston export. Foodie and over-the-hill hockey player. @devon's lesser half",
  "default_profile_image": false,
  "profile_background_image_url": "http://a0.twimg.com/profile_background_images/113854313/xa60e82408188860c483d73444d53e21.png",
  "statuses_count": 13728,
  "friends_count": 1780,
  "following": true,
  "show_all_inline_media": true,
  "screen_name": "rsarver"
}
{
  "id": "100002848723001", 
  "birthday": "07/13/1988", 
  "first_name": "Dca", 
  "gender": "male", 
  "hometown": {
    "id": "110765362279102", 
    "name": "Taipei, Taiwan"
  }, 
  "interested_in": [
    "female"
  ], 
  "last_name": "Hsu", 
  "link": "http://www.facebook.com/100002848723001", 
  "location": {
    "id": "113327725348468", 
    "name": "Matsu, Fu-Chien, Taiwan"
  }, 
  "locale": "zh_TW", 
  "name": "Dca Hsu", 
  "relationship_status": "In a relationship", 
  "significant_other": {
    "id": "521813915", 
    "name": "Muki Wu"
  }, 
  "timezone": 8, 
  "updated_time": "2014-09-27T03:05:56+0000", 
  "verified": true
}

都長的不一樣

OMG...

車同軌,書同文

凡事照規矩來

依法行事。

Schema.org

!?

Event

Movie

Organization

Person

Book

Product

Place

JSON-LD

{
  "@context": "http://schema.org/",
  "@type": "Person",
  "name": "Dca Hsu",
  "born": "1988-07-13",
  "telephone": "(0912) 110-713",
  "url": "http://github.com/dca",
  "spouse": "http://github.com/mukiwu"
}

回歸正題...

APIs

{
  "login": "octocat",
  "id": 1,
  "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  "gravatar_id": "",
  "url": "https://api.github.com/users/octocat",
  "html_url": "https://github.com/octocat",
  "followers_url": "https://api.github.com/users/octocat/followers",
  "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  "organizations_url": "https://api.github.com/users/octocat/orgs",
  "repos_url": "https://api.github.com/users/octocat/repos",
  "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  "received_events_url": "https://api.github.com/users/octocat/received_events",
  "type": "User",
  "site_admin": false,
  "name": "monalisa octocat",
  "company": "GitHub",
  "blog": "https://github.com/blog",
  "location": "San Francisco",
  "email": "octocat@github.com",
  "hireable": false,
  "bio": "There once was...",
  "public_repos": 2,
  "public_gists": 1,
  "followers": 20,
  "following": 0,
  "created_at": "2008-01-14T04:33:35Z",
  "updated_at": "2008-01-14T04:33:35Z"
}
{
  "profile_sidebar_fill_color": "F8FCF2",
  "profile_sidebar_border_color": "547980",
  "profile_background_tile": true,
  "name": "Ryan Sarver",
  "profile_image_url": "http://a0.twimg.com/profile_images/1777569006/image1327396628_normal.png",
  "created_at": "Mon Feb 26 18:05:55 +0000 2007",
  "location": "San Francisco, CA",
  "follow_request_sent": false,
  "profile_link_color": "547980",
  "is_translator": false,
  "id_str": "795649",
  "default_profile": false,
  "contributors_enabled": true,
  "favourites_count": 3162,
  "url": null,
  "profile_image_url_https": "https://si0.twimg.com/profile_images/1777569006/image1327396628_normal.png",
  "utc_offset": -28800,
  "id": 795649,
  "profile_use_background_image": true,
  "listed_count": 1586,
  "profile_text_color": "594F4F",
  "lang": "en",
  "followers_count": 276334,
  "protected": false,
  "notifications": true,
  "profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/113854313/xa60e82408188860c483d73444d53e21.png",
  "profile_background_color": "45ADA8",
  "verified": false,
  "geo_enabled": true,
  "time_zone": "Pacific Time (US & Canada)",
  "description": "Director, Platform at Twitter. Detroit and Boston export. Foodie and over-the-hill hockey player. @devon's lesser half",
  "default_profile_image": false,
  "profile_background_image_url": "http://a0.twimg.com/profile_background_images/113854313/xa60e82408188860c483d73444d53e21.png",
  "statuses_count": 13728,
  "friends_count": 1780,
  "following": true,
  "show_all_inline_media": true,
  "screen_name": "rsarver"
}
{
  "id": "100002848723001", 
  "birthday": "07/13/1988", 
  "first_name": "Dca", 
  "gender": "male", 
  "hometown": {
    "id": "110765362279102", 
    "name": "Taipei, Taiwan"
  }, 
  "interested_in": [
    "female"
  ], 
  "last_name": "Hsu", 
  "link": "http://www.facebook.com/100002848723001", 
  "location": {
    "id": "113327725348468", 
    "name": "Matsu, Fu-Chien, Taiwan"
  }, 
  "locale": "zh_TW", 
  "name": "Dca Hsu", 
  "relationship_status": "In a relationship", 
  "significant_other": {
    "id": "521813915", 
    "name": "Muki Wu"
  }, 
  "timezone": 8, 
  "updated_time": "2014-09-27T03:05:56+0000", 
  "verified": true
}

整理後

[
  {
    "@type": [
      "http://schema.org/Person"
    ],
    "http://schema.org/born": [
      {
        "@value": "1988-07-13"
      }
    ],
    "http://schema.org/name": [
      {
        "@value": "Dca Hsu"
      }
    ],
    "http://schema.org/spouse": [
      {
        "@value": "http://github.com/mukiwu"
      }
    ],
    "http://schema.org/telephone": [
      {
        "@value": "(0912) 110-713"
      }
    ],
    "http://schema.org/url": [
      {
        "@id": "http://github.com/dca"
      }
    ]
  }
]

回歸正題...

應用

看報紙才知道。

_

SEO

JSON for Linking Data

Data is messy and disconnected. JSON-LD organizes and connects it, creating a better Web.

Made with Slides.com