Skip to content

JSON Values are improperly stored #285

Description

@mslinn

python-dotenv does not store valid JSON. The JSON standard requires double quotes and will not accept single quotes, nor will the parser.

JSON values are escaped to death by python-dotenv because double quotes are used to delimit values. For example, instead of storing JSON values nicely, like this:

MY_JSON='{"a": "b"}'

They are stored as:

MY_JSON="{\"a\": \"b\"}"

... which is not JSON. Yes, it could be transformed into JSON.

python-dotenv reads values surrounded by single quotes without any problem. Is there a technical reason why values are not stored by default surrounded by single quotes?

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