mouse07410 / asn1c

The ASN.1 Compiler
http://lionet.info/asn1c/
BSD 2-Clause "Simplified" License
93 stars 70 forks source link

jer: Formatting enhancements #153

Closed v0-e closed 8 months ago

v0-e commented 8 months ago

Provides several enhancements to JER encoder output.

Example before:

{

    "int1": 851,
    "intopt1": 12412,
    "seqofch": [{
"int1":61},{
"seqofbs":["0203"
                ,"030405"
                ,"04050607"
                ,"0506070809"

            ]}
    ],
    "bs": "02040608"
    ,
    "os": "020406080A",
    "seqofint": [9509,919,99
    ],
    "ch": {
"seqofreal":[5.505E3,5.15E2,5.5E1
        ]},
    "seqofnull": [null,null,null
    ],
    "bool1": true,
    "null1": null,
    "enumerated1": "rejected",
    "roi": "8.9.10.11",
    "bmps": "",
    "utf": "abnlmz",
    "setofps": ["stringA","another\"string"
    ],
    "setofnull": [
    ],
    "gt": "19821106210629.456",
    "r": 0,
    "seqA": {

        "int1": 0,
        "bool1": true,
        "enumerated1": "tryagain"}
    }

Example after:

{
    "int1": 851,
    "intopt1": 12412,
    "seqofch": [
        {
            "int1": 61
        },
        {
            "seqofbs": [
                "0203",
                "030405",
                "04050607",
                "0506070809"
            ]
        }
    ],
    "bs": "02040608",
    "os": "020406080A",
    "seqofint": [
        9509,
        919,
        99
    ],
    "ch": {
        "seqofreal": [
            5.505E3,
            5.15E2,
            5.5E1
        ]
    },
    "seqofnull": [
        null,
        null,
        null
    ],
    "bool1": true,
    "null1": null,
    "enumerated1": "rejected",
    "roi": "8.9.10.11",
    "bmps": "",
    "utf": "abnlmz",
    "setofps": [
        "stringA",
        "another\"string"
    ],
    "setofnull": [
    ],
    "gt": "19821106210629.456",
    "r": 0,
    "seqA": {
        "int1": 0,
        "bool1": true,
        "enumerated1": "tryagain"
    }
}