apacheconfig icon indicating copy to clipboard operation
apacheconfig copied to clipboard

Empty string is parsed as None

Open ssumit3 opened this issue 5 years ago • 0 comments

Value specified as empty string is returned as None by the parser. However the Perl Config::General module keeps the empty string. for example for the below code snippet:

<mytag>
        name        entry
        key_field   STRING
        prod        ''
        uat         --uat
        DEFAULT     --uat
</mytag>

Python parser produces following output:

{
"mytag":{ 
            "DEFAULT":"--uat",
            "prod":None,
            "key_field":"STRING",
            "uat":"--uat",
            "name":"entry"
         }
}

Perl parser produces following output:

{
"mytag":{
        "DEFAULT": "--uat", 
        "prod": "''", 
        "key_field": "STRING", 
        "name": "entry", 
        "uat": "--uat"
      }
}

ssumit3 avatar Jul 22 '20 05:07 ssumit3