foundry-rs/forge-std
Auf GitHub ansehendocs(StdJson): document that key parameter must start with a dot
Open
#394 geöffnet am 29. Mai 2023
documentationgood first issue
Repository-Metriken
- Stars
- (1.041 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 12m) (3 gemergte PRs in 30 T)
Beschreibung
The current documentation for the JSON cheats does not explain that the key parameter must be provided with a leading dot:
I was trying to access the key by its simple name, like so:
string memory json = '{"bar":"Hello World"}';
string memory bar = vm.parseJsonString(json, "bar");
And that didn't work until I added the leading dot, i.e. .bar.
Side note: the parameters for the parseJsonSOMETHING cheats have been left unnamed.