Thanks to visit codestin.com
Credit goes to github.com

Skip to content

dyff yaml does not sanitize "," in output values #209

@asford

Description

@asford

Unsure if this is a dyff bug, or bug in a sub library. Happy to redispatch!

dyff yaml produces invalid output if "," is present as a value.
This may be related to output value escaping or sanitization for yaml?

Minimal repro:

$ dyff version
dyff version 1.4.7

$ dyff yaml - <<EOL
> {"a": ","}
> EOL
---
a: ,

$ dyff json - <<EOL
---
a: ,
EOL
╭ Error: failed to process input files
│ failed to write output to stdout: failed to load input from stdin: unable to parse data from stdin: yaml: did not find expected node content
╵

$ dyff yaml - <<EOL
> {"a": ","}
> EOL
---
a: ,

$ dyff json - <<EOL
a: ","
EOL
{
│ "a": ","
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions