how to disable quote when using --input-format props #2023
-
|
When the input format is props e.g. echo a.b.c 10 | yq --input-format propsthe output value is string, while number is expected a:
b:
c: "10"expected outupt a:
b:
c: 10Also adding |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hi, The property file decoder only decodes values as strings (which I think is a property file thing?) and so yq assumes all values are strings. You can get I've just added a example to the docs: https://mikefarah.gitbook.io/yq/usage/properties#decode-properties-numbers |
Beta Was this translation helpful? Give feedback.
Hi,
The property file decoder only decodes values as strings (which I think is a property file thing?) and so yq assumes all values are strings.
You can get
yqto post process the document and attempt to parse all the values. This will leave anything it can't parse as a string still.I've just added a example to the docs:
https://mikefarah.gitbook.io/yq/usage/properties#decode-properties-numbers