我有一个这种格式的 JSON 数组:
{
"productList" : [
{
"nodeRef" : "workspace:\/\/SpacesStore\/55f8dd88-dccd-4c09-9a67-bb3f2d5f02d4",
"photoProduit" : "api\/node\/workspace\/SpacesStore\/60f80999-0d2b-4798-abbb-786d5fe13a85\/content\/thumbnails\/doclib",
"typeProduit" : "Bonbon",
"uniteQuantite" : "48",
"tarifUnitaire" : "1.89",
"descriptionProduit": "Sweets product update test 2"
}
,
{
"nodeRef" : "workspace:\/\/SpacesStore\/c2ffb3c1-9091-47fb-9b01-ce6b0d30a869",
"photoProduit" : "api\/node\/workspace\/SpacesStore\/77264862-54a4-4248-acf0-8e36c400dc1a\/content\/thumbnails\/doclib",
"typeProduit" : "Post It Notes",
"uniteQuantite" : "10",
"tarifUnitaire" : "2.76",
"descriptionProduit": "Post It Notes"
}
]
}
我不确定如何访问数组元素,因为 productList 是一个散列。是否可以在 freemarker 中解析它,因为哈希没有太多内置插件,而且我似乎无法将序列内置插件应用于数据。