Javascript 为什么我的小提琴演奏不正确?
我希望呈现为树的JSON是Javascript 为什么我的小提琴演奏不正确?,javascript,json,extjs,sencha-architect,Javascript,Json,Extjs,Sencha Architect,我希望呈现为树的JSON是 { "productOfferings": [ { "text": "Mobile subscription with Internet access 2GB and iPad 32GB", "description": "Joors 2GB mobile broadband and iPad 32GB", "productOfferings": [
{
"productOfferings": [
{
"text": "Mobile subscription with Internet access 2GB and iPad 32GB",
"description": "Joors 2GB mobile broadband and iPad 32GB",
"productOfferings": [
{
"id": 5,
"text": "Ipad with 32 GB storage",
"description": "A iPad 32 GB Product Offering",
"productSpecification": {
"id": 5,
"text": "IPad",
"description": ""
}
},
{
"id": 8,
"text": "Mobile subscription with Sim Card and Internet access 2GB",
"description": "Mobile subscription with Sim Card and Internet access 2GB",
"productSpecification": {
"id": 9,
"text": "Mobile subscription with sim card and Internet access",
"description": "Mobile subscription with sim card and Internet access",
"productSpecifications": [
{
"id": 2,
"text": "Mobile subscription with Sim Card",
"description": "This is the classic Subscription product of a Mobile Network totally void of Services, so it can only be used for accessing a HPLMN. Simply put a MSISDN + SIM"
},
{
"id": 4,
"text": "Mobile Internet access",
"description": "This is a GPRS Service for a Mobile Network Access Product for accessing Internet"
}
]
}
}
]
}
]
}
我想用extJS呈现一棵树,就像在jsonviewer.stack.hu中使用json一样
我试着用小提琴演奏,但没能做到,小提琴有几点很奇怪:
当我使根不可见时,它会变成两个根。很奇怪。无法设置displayField,它必须有名称“text”,但我不能因为extJS而更改json。我希望文本字段的名称为“name”。我一直在尝试像jsonviewer.stack那样呈现produtSpecification,但如何实现却令人费解。您能帮助我吗?作为第一个提示,ID在JSON中必须是唯一的:作为第一个提示,ID在JSON中必须是唯一的: