public class JsonConverter extends Object
EntityDocument to JSON for later
serialization. The JSON matches the official JSON format the Wikibase uses
for exporting data, e.g., through the Web API.| Constructor and Description |
|---|
JsonConverter() |
| Modifier and Type | Method and Description |
|---|---|
org.json.JSONObject |
getJsonForItemDocument(ItemDocument document)
Returns a JSONObject that encodes the given
ItemDocument. |
org.json.JSONObject |
getJsonForPropertyDocument(PropertyDocument document)
Returns a JSONObject that encodes the given
PropertyDocument. |
public org.json.JSONObject getJsonForItemDocument(ItemDocument document)
ItemDocument.document - the ItemDocument to be convertedpublic org.json.JSONObject getJsonForPropertyDocument(PropertyDocument document)
PropertyDocument.document - the PropertyDocument to be convertedCopyright © 2014 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage