【问题】
I’m trying to export JSON to a csv file, but I can’t seem to find a step by step tutorial. I’m wondering if anyone can help me?
I have parsed my JSON file using the approach discribed in this link.
It works now, but I still need to figure out how to export the parsed data into a CSV file..
You can find in the link below the JSON file I parsed, I just have to figure out how to export:
“attributeName”: “Description”,
“attributeValue”: ""
“attributeName”: “Functional Area”,
“attributeValue”: “TECH”
public static void main(String[] args){
String json=“{\“content\”: [ {\“a\”:{ \“b\” : \“abcd\”, \“c\” : \“bcd\”},\“ab\” : \“123\”,\“abc\”:{\“id\” : \“12345\”, \“name\” : \“abcde\”},\“cd\”: \“afsf\”},{\“a\”:{\“b\” : \“abcd\”, \“c\” : \“bcd\”},\“ab\” : \“123\”,\“abc\”:{\

本文档解答了如何将包含多层结构的JSON数据导出为CSV文件的问题。提到了通过链接中提供的方法解析JSON,然后使用SPL脚本简化了将id和name字段提取并转换为CSV的过程。提供了SPL代码示例,该代码能够直接在Java环境中运行,并能生成CSV文件。
最低0.47元/天 解锁文章
686

被折叠的 条评论
为什么被折叠?



