Question

Wikipedia has unstructured and structured information about any topic. I specially want to get structured data which is always displayed at the right side of an article. This side contains different data as you can see in an example below:

Country Turkey
Region  Central Anatolia
Province    Ankara
Area
 • Capital City 2,516 km2 (971 sq mi)
Elevation   938 m (3,077 ft)
Population (2011)[1][2]
 • Capital City 4,338,620
 • Density  1,551/km2 (4,020/sq mi)
 • Metro    4,965,542
Time zone   EET (UTC+2)
 • Summer (DST) EEST (UTC+3)

Structured data as shown in wikipedia

How can I read that data using Java and the JSON response?

Was it helpful?

Solution

[Assuming Wikpedia was meant]

DBpedia [1] is a project that aims to extract structured data from Wikipedia. You can query their database using the SPARQL endpoint. You get property-value pairs, for example, you can get the structured data connected to Berlin here [2].

[1] http://wiki.dbpedia.org/ [2] http://dbpedia.org/page/Berlin

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top