我正在尝试将一组哈希映射从Java返回到php
我在php中想要的是:
Array :
[0] =>
['abc'] = "blah blah abc"
['def'] = "blah blah def"
['ghi'] = "blah blah ghi"
[1] =>
['abc'] = "blah blah pqr"
['def'] = "blah blah stu"
['ghi'] = "blah blah xyz"
通过Java <=> thrift <=> php
完成此操作的最佳方式是什么?
答案 0 :(得分:0)
确定,
到目前为止,我已经这样做了:
我的节俭文件:
namespace java lserver.gen
service LuceneServer {
list<map<string,string>> search(1:string term)
}
我返回一个像这样的ArrayList:
HashMap<String, String> res = new HashMap();
ArrayList<HashMap> result = new ArrayList<HashMap>();
//blah blah blah
return result;
所以在php中我可以访问所提到的问题......
但我当然不知道这是否是最有效的方式......