猪的嵌套json没有给出正确的输出

时间:2017-01-25 08:06:58

标签: json hadoop apache-pig

{"query":"32 gb memory card and pen drive","queryObj":{"32 Gb memory card and Pen drive":34359738368,"32 gb memory card and pen drive":6872838602707},"implicitIntent":[],"textualIntent":[{"attributes":{"attributes":[{"field":{"name":"store"},"value":"Memory Cards & Readers","properties":{"storeId":"zzf","storePath":"tyy/4mr/zzf","isLeaf":false}} ]}}]}

我希望queryfield-name以及value使用jsonpig。所以我写了以下脚本:

G = LOAD 'quattr.json' USING JsonLoader('query:chararray, textualIntent: {(attributes:(attributes:{(field: (name:chararray),value:chararray)}))}') ;

但这仅提供查询输出,而不是其他两个字段:

(32 gb memory card and pen drive,)

愿任何人帮忙解决问题吗?感谢

0 个答案:

没有答案