You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The yaml, json, toml, and ini share a lot of the same operations and so should have some shared libraries. Right now we have a bloated *_in_place hook. In the future it would be good to have a shared library of operations that each tool wraps.
Structured File Hook Shared Functions
Update all the structured file hooks (ie yaml, json, toml, and ini) to have shared functions.
Proposal Status: considering
Issue Number: 260
Proposal Doc: structured-file-hooks.md
Overview
The yaml, json, toml, and ini share a lot of the same operations and so should have some shared libraries. Right now we have a bloated
*_in_place
hook. In the future it would be good to have a shared library of operations that each tool wraps.Supported hooks (yaml as example):
yaml_update_key
yaml_merge_key
yaml_remove_key
yaml_pop_key
yaml_pop_item
yaml_insert_item
yaml_append_item
yaml_read
Comment Preserving
yaml
json
toml
ini
New Hooks
yaml_update
fields
file
Optional - key
Value
in_place - bool
Reads yaml and updates
yaml_update_in_place
yaml_append
yaml_delete
yaml_pop
yaml_get
yaml_parse / yaml_read
Already have yamldecode / yamlencode
Reads a string into a yaml
yaml
hook by default takes a string to a path. If that is not a path then it should simply throw error and not try to parse as string.The text was updated successfully, but these errors were encountered: