Additional Colon After Scalar Values #541
Replies: 2 comments 3 replies
-
Hmm, this works: compose.addIn(['volumes', `${project}-db-volume`], null)
compose.addIn(['networks', network, 'driver_opts', 'encrypted'], 1) → Why? |
Beta Was this translation helpful? Give feedback.
-
Huh, yeah, the stringifier for that should fail with The problem is caused by the YAMLMap.prototype.add({ test: { driver_opts: { encrypted: 1 } } }) That function is expecting to either get a So you end up with the object being assigned as a mapping key, with an empty value. Without any stringifier options, your doc formats as networks:
xxx:
? test:
driver_opts:
encrypted: 1 where the As complex keys aren't allowed with |
Beta Was this translation helpful? Give feedback.
-
Hi all, I have issues generating proper scalars (
null
, numbers, sometimes strings) in YAML with the library.When I add scalars in JSON objects, they get an additional colon
:
, as if they were mapping-keys instead of simple scalars:Background: I want to automate addition of projects to
docker-compose.yaml
definitions.Simple reproduction of the problem:
Expected Output:
Actual output:
I have the same issue with:
Expected:
Actual output:
Is this a bug or a feature?
And how doe I get what I want?
Beta Was this translation helpful? Give feedback.
All reactions