Refactoring Yaml encoder prefs

This commit is contained in:
Mike Farah
2024-02-24 15:36:16 +11:00
parent f44d47a204
commit 7a01e216c4
21 changed files with 103 additions and 86 deletions
+11 -11
View File
@@ -218,16 +218,16 @@ yq -p=props sample.properties
will output
```yaml
person:
# block comments come through
# comments on values appear
name: Mike Wazowski
pets:
# comments on array values appear
- cat
- nested:
- list entry
food:
- pizza
# block comments come through
# comments on values appear
name: Mike Wazowski
pets:
# comments on array values appear
- cat
- nested:
- list entry
food:
- pizza
```
## Decode properties - array should be a map
@@ -244,7 +244,7 @@ yq -p=props '.things |= array_to_map' sample.properties
will output
```yaml
things:
10: mike
10: mike
```
## Roundtrip