从asn1文件(网络文件)创建JSON对象

时间:2019-09-19 09:56:51

标签: json scala

我使用数组获取属性名称,稍后在代码中提取值

例如

cCAccountData
        {
            servedAccount : '81628461237556'H
            serviceClassID : '104'D
            accountGroupID : '0'D
            accountValueBefore
            {
                amount : '0'D
                decimals : '6'D
                currency : '516'D
            }
            accountValueAfter
            {
                amount : '0'D
                decimals : '6'D
                currency : '516'D
            }
            communityInformation
            {
                nonServedCommunityNo : '91628481059035'H
            }
            accumulators
            {
                [0]
                {
                    accumulatorID : '100'D
                    accumulatorChange : '1'D
                    accumulatorAfter : '2'D
                    accumulatorBeforeSession : '1'D
                }
                [1]
                {
                    accumulatorID : '104'D
                    accumulatorChange : '1'D
                    accumulatorAfter : '2'D
                    accumulatorBeforeSession : '1'D
                }
            }

...........

我的asn1文件结构示例

我有些文件内部没有结构,并且获取该属性非常简单,但是嵌套结构似乎并不那么容易。

//creating an array containing attributes
val datakeywords = Array("chargingContextID","subscriptionIDValue","triggerTime","recordIdentificationNumber","sessionId","originRealm","originHost","serviceIdentifier","usedServiceUnits")

0 个答案:

没有答案