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
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
The text was updated successfully, but these errors were encountered:
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.
From the docs:
Additional context
No response
The text was updated successfully, but these errors were encountered: