Skip to content

Improve JSON path documentation for writeJson and writeToml cheatcodes#1652

Merged
onbjerg merged 1 commit intofoundry-rs:masterfrom
Signor1:fix-1638
Sep 10, 2025
Merged

Improve JSON path documentation for writeJson and writeToml cheatcodes#1652
onbjerg merged 1 commit intofoundry-rs:masterfrom
Signor1:fix-1638

Conversation

@Signor1
Copy link
Contributor

@Signor1 Signor1 commented Sep 9, 2025

Fixes #1638

Clarifies JSON path syntax in the documentation for vm.writeJson and vm.writeToml cheatcodes.

Changes:

  • Explains that paths like "key.foo" get silently converted to "$key.foo" and fail
  • Documents that paths should start with . or $ (e.g., ".key.foo" or "$.key.foo")
  • Adds reference to the underlying jsonpath_lib library
  • Includes examples of valid path formats

This addresses user confusion about why certain JSON paths don't work as expected.

@zerosnacks
Copy link
Member

Thanks! Changes make sense, pending review of @onbjerg

@onbjerg onbjerg merged commit 79da78e into foundry-rs:master Sep 10, 2025
1 check passed
@Signor1
Copy link
Contributor Author

Signor1 commented Sep 10, 2025

@all-contributors please add @Signor1

@allcontributors
Copy link
Contributor

@Signor1

I couldn't determine any contributions to add, did you specify any contributions?
Please make sure to use valid contribution names.

@Signor1
Copy link
Contributor Author

Signor1 commented Sep 10, 2025

@all-contributors please add @Signor1 for Maintenance

@allcontributors
Copy link
Contributor

@Signor1

I've put up a pull request to add @Signor1! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document JSON paths more clearly

3 participants