Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/StdJson.sol
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ library stdJson {
return vm.parseJsonBytesArray(json, key);
}

function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) {
return vm.serializeJson(jsonKey, rootObject);
}

function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) {
return vm.serializeBool(jsonKey, key, value);
}
Expand Down
1 change: 1 addition & 0 deletions src/Vm.sol
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ interface VmSafe {

// Serialize a key and value to a JSON object stored in-memory that can be later written to a file
// It returns the stringified version of the specific JSON file up to that moment.
function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json);
function serializeBool(string calldata objectKey, string calldata valueKey, bool value)
external
returns (string memory json);
Expand Down