假设我有以下JSON文档:
{
"@id":"http://www.example.com/id/linkFrom",
"http://www.example.com/link":{
"@id":"http://www.example.com/id/linkTo",
"linkType":{
"@id": "http://www.example.com/vocab#specialLink"
}
}
}
如何表示三联<http://www.example.com/id/linkFrom> <http://www.example.com/link> <http://www.example.com/id/linkTo>
的类型为http://www.example.com/vocab#specialLink
?
答案 0 :(得分:2)
我不确定你是否真的要分配&#34;类型&#34;对于整个三联,但正如你要求它并提到Reification,你可以做这样的事情:
ScrollView
{
anchors.fill: parent
Column {
Repeater {
model: 4;
delegate: Item {
width: root.width;
height: image.sourceSize.height;
Image {
id: image;
anchors.centerIn: parent;
width: parent.width;
fillMode: Image.Stretch;
source: "img" + (index+1) + ".png"
}
}
}
}
}