如何规范化scala中的JSON数据

时间:2018-06-04 18:03:06

标签: json scala apache-spark normalization

我想将此json转换为scala / spark

中的规范化表结构

不确定如何继续获得此结构。

{
    "codeDescData": {
        "codeCategory": "alphabets",
        "fieldName": "alpha fieldname",
        "codes": [{
            "code": "XYZ",
            "codeDescription": "LAST 3 OF 26"
        },
        {
            "code": "KLM",
            "codeDescription": "Somewhere in the middle",

        }],
        "otherCodes:[{
            "key":"ABC",
            "KeyDescription":"descriptionofABC"
        },
        {
            "key":"DEF",
            "keyDescription":"DescriptionforDEF"
        }
        ]"
    }
}

enter image description here

0 个答案:

没有答案