Open
Description
Repro:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import {stdJson} from "forge-std/StdJson.sol";
import "forge-std/Test.sol";
contract JsonTest is Test {
function testEscapedQuotes() public {
string memory json = '{"foo":"quotation mark: \'\\"\' and backslash: \\\\"}';
assertEq(stdJson.readString(json, ".foo"), 'quotation mark: \'"\' and backslash: \\');
}
}
The test passes with b4f1215 but fails with f8e700e
[FAIL. Reason: Assertion failed.] testEscapedQuotes() (gas: 19525)
Logs:
Error: a == b not satisfied [string]
Expected: quotation mark: '"' and backslash: \
Actual: quotation mark: '\' and backslash: \\
Metadata
Metadata
Assignees
Labels
No labels