v1.7.0+
Status: | effective |
Progress: | 100% |
Version: | 1.7.0+ |
Monolingual text | |
---|---|
API result format for data type Monolingual text | |
Keywords | |
API · API module · API result · action ask · ask · action askargs · askargs · datatype Monolingual text
|
When using the API modules to query for semantic data, different datatypes may have different output formats. This page gives an example for datatype "Monolingual text"Holds a text value that associates the annotation with a specific language code using API-module "ask"Allows to do ask queries. API-module "askargs"Allows to do ask queries with as little ask query specific syntax as possible however uses the same output format.
Example JSON result output[edit]
You can experiment with the api result output yourself by using the API Sandbox. The following example can be reproduced here.
{
"query": {
"printrequests": [
{
"label": "Has mlt",
"key": "Has_mlt",
"redi": "",
"typeid": "_mlt_rec",
"mode": 1,
"format": ""
}
],
"results": {
"Help:List of datatypes": {
"printouts": {
"Has mlt": [
{
"Text": {
"label": "Text",
"key": "_TEXT",
"typeid": "_txt",
"item": [
"Monoglingual text in english"
]
},
"Language code": {
"label": "Language code",
"key": "_LCODE",
"typeid": "__lcode",
"item": [
"en"
]
}
},
{
"Text": {
"label": "Text",
"key": "_TEXT",
"typeid": "_txt",
"item": [
"Texte monoglinguel en fran\u00e7ais"
]
},
"Language code": {
"label": "Language code",
"key": "_LCODE",
"typeid": "__lcode",
"item": [
"fr"
]
}
},
{
"Text": {
"label": "Text",
"key": "_TEXT",
"typeid": "_txt",
"item": [
"Einsprachiger Text auf Deutsch"
]
},
"Language code": {
"label": "Language code",
"key": "_LCODE",
"typeid": "__lcode",
"item": [
"de"
]
}
}
]
}
}
},
"serializer": "SMW\\Serializers\\QueryResultSerializer",
"version": 2,
"meta": {
"hash": "9ab03310a6114ca7973008100fd65f76",
"count": 1,
"offset": 0,
"source": "",
"time": "0.006316"
}
}
}