Wikidata/Development/Phase 2 JSON: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Content deleted Content added
Created page with "// This is a draft for how Phase 2 JSON could look like. You can copy and paste it into a JS engine to play around with it. Category:Wikidata berlin = { "id": 109, "si..."
 
No edit summary
Line 1: Line 1:
// This is a draft for how Phase 2 JSON could look like. You can copy and paste it into a JS engine to play around with it. [[Category:Wikidata]]
// This is a draft for how Phase 2 JSON could look like. You can copy and paste it into a JS engine to play around with it. [[Category:Wikidata]]


berlin = {
berlin = {
"id": 109,
"id": 109,
"sitelinks": {
"sitelinks": {
"enwiki": {
"enwiki": {
"site": "enwiki",
"site": "enwiki",
"title": "Berlin"
"title": "Berlin"
},
},
"dewiki": {
"dewiki": {
"site": "dewiki",
"site": "dewiki",
"title": "Berlin"
"title": "Berlin"
}
}
},
},
"labels": {
"labels": {
"en": {
"en": {
"language": "en",
"language": "en",
"value": "Berlin"
"value": "Berlin"
}
}
},
},
"descriptions": {
"descriptions": {
"en": {
"en": {
"language": "en",
"language": "en",
"value": "The capital of Germany"
"value": "The capital of Germany"
}
}
},
},
"aliases": {
"aliases": {
"en": [{
"en": [{
"language": "en",
"language": "en",
"value": "City of Berlin"
"value": "City of Berlin"
}, {
}, {
"language": "en",
"language": "en",
"value": "B\u00e4rlin"
"value": "B\u00e4rlin"
}]
}]
},
},
"statements" : {
"statements" : {
"p17" : { // location
"p17" : { // location
"c28" : { // guid
"c28" : { // guid
"value" : 123, // Germany
"value" : 123, // Germany
"type" : "item",
"type" : "item",
"references" : {
"references" : {
"r21" : {
"r21" : {
"p32" : 1234, // property: book, item: CIA world factbook
"p32" : { // book
"value" : 1234, // CIA world factbook
"p23" : { // page
"type" : "item"
"value" : 171,
},
"accuracy" : {
"p23" : { // page
"type" : "number",0,
"value" : 171,
"type" : "number"
"type" : "number"
}
}
},
},
"r38" : {
"p32" : 372 // property: book, item: some geography textbook
"r38" : {
"p32" : 372 // property: book, item: some geography textbook
"type" : "item"
}
}
}
}
}
}
},
"p2313" : { // population
},
"p2313" : { // population
"c33" : {
"c33" : {
"value" : {
"value" : {
"value" : "3500000",
"value" : "3500000",
"type" : "number",
"type" : "number",
"accuracy" : {
"accuracy" : {
"value" : "100000"
"value" : "100000"
}
}
},
},
"p1234" : { // qualifier "as of"
"p1234" : { // qualifier "as of"
"value" : "2011",
"value" : "2011-01-01T00:00:00",
"type" : "time",
"type" : "time",
"accuracy" : {
"accuracy" : {
"value" : "1",
"value" : "1",
"unit" : "year"
"unit" : "year"
}
}
}
}
}
}
}
}
}
}
}
}


// Berlin -> location -> Germany
// Berlin -> location -> Germany

Revision as of 16:38, 14 September 2012

// This is a draft for how Phase 2 JSON could look like. You can copy and paste it into a JS engine to play around with it.

 berlin = {
   "id": 109,
   "sitelinks": {
     "enwiki": {
       "site": "enwiki",
       "title": "Berlin"
     },
     "dewiki": {
       "site": "dewiki",
       "title": "Berlin"
     }
   },
   "labels": {
     "en": {
       "language": "en",
       "value": "Berlin"
     }
   },
   "descriptions": {
     "en": {
       "language": "en",
       "value": "The capital of Germany"
     }
   },
   "aliases": {
     "en": [{
       "language": "en",
       "value": "City of Berlin"
     }, {
       "language": "en",
       "value": "B\u00e4rlin"
     }]
   },
   "statements" : {
     "p17" : { // location
       "c28" : { // guid
         "value" : 123, // Germany
         "type" : "item", 
         "references" : {
           "r21" : {
             "p32" : { // book
               "value" : 1234, // CIA world factbook
               "type" : "item"
             },
             "p23" : { // page
               "value" : 171,
               "type" : "number"
             }
           },
           "r38" : {
             "p32" : 372 // property: book, item: some geography textbook
             "type" : "item"
           }
         }
       }
     },
     "p2313" : { // population
       "c33" : {
         "value" : {
           "value" : "3500000",
           "type" : "number",
           "accuracy" : {
             "value" : "100000"
           }
         },
         "p1234" : { // qualifier "as of"
           "value" : "2011-01-01T00:00:00",
           "type" : "time",
           "accuracy" : {
             "value" : "1",
             "unit" : "year"
           }
         }			
       }
     }
   }
 }

// Berlin -> location -> Germany // Berlin population 3,5 Mio as of 2011