Skip to content

Empty string is parsed as None #106

Description

@ssumit3

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"
      }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions