-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
Milestone
Description
Component
Forge
Describe the feature you would like
Currently, vm.writeJson
is only able to update existing keys which makes it really cumbersome to use when deploying new contracts for the first time and printing them to a file. Instead, it should be able to add new key & value pairs with it, too.
It should also be possible to add nested keys where the parent(s) aren't existing yet as well.
Or at least, the docs should be updated with an easy example on how to add a new (nested) key to an existing JSON file.
This is useful to replace some values in a JSON file without having to first parse and then reserialize it. Note that the JSON path must indicate an existing key, so it’s not possible to add new keys this way.
Additional context
No response
Thegaram, adairrr, kfastov and deluca-mike
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Completed