我正在尝试解析 json 字符串列表的一列,但即使在使用 structType、structField 等尝试了多个模式之后,我也根本无法获取模式。
[{"event":"empCreation","count":"148"},{"event":"jobAssignment","count":"3"},{"event":"locationAssignment","count":"77"}]
[{"event":"empCreation","count":"334"},{"event":"jobAssignment","count":33"},{"event":"locationAssignment","count":"73"}]
[{"event":"empCreation","count":"18"},{"event":"jobAssignment","count":"32"},{"event":"locationAssignment","count":"72"}]
基于this SO post,我能够派生json模式,但即使在应用from_json函数之后,它仍然无法工作
你能帮忙吗?