Giter Site home page Giter Site logo

Comments (5)

TomWright avatar TomWright commented on May 25, 2024 1

I think this is a quoting issue. I'll take a look and potentially add some more flags to enable/disable string quoting when writing values.

from dasel.

TomWright avatar TomWright commented on May 25, 2024 1

I've been on holiday but will try to add the flag mentioned above once I've caught up with work

from dasel.

TomWright avatar TomWright commented on May 25, 2024 1
tom ~ $ dasel -v
dasel version 2.3.5
tom ~ $ echo 'annotations:
  previousShortSHA: old' | dasel put -r yaml -t string -v '1615' 'annotations.previousShortSHA'
annotations:
    previousShortSHA: "1615"

from dasel.

Argelbargel avatar Argelbargel commented on May 25, 2024

Hi. I've got a similar problem. I'm modifying an existing YAML file adding some keys. After writing it out as YAML empty string are converted to nil/null instead of empty strings. So this:

empty_value: ""

is converted to

empty_value:

which ist okay most of the time - except when the code reading the YAML checks explicitly for the empty string. So keeping the type/quoting empty values would be a great option

from dasel.

TomWright avatar TomWright commented on May 25, 2024

I've added a fix in a way that avoids the need for a new flag. This will be released in the next version.

from dasel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.