Open lyh169 opened 2 years ago
pragma solidity ^0.8.7; contract Json { function getParameter(string memory jsonData) public view returns (string memory) { return jsonData; } }
I want to store JSON input in my Smart Contract. Like
{ "name":"John" }
when i input { "name":"John" } or "{ \"name\":\"John\" }" ,Remix says, that there is an SyntaxError:
call to Json.getParameter errored: Error encoding arguments: Error: types/values length mismatch (count={"types":1,"values":3}, value={"types":["string"],"values":["{ \",":\"," }"]}, code=INVALID_ARGUMENT, version=abi/5.5.0)
Can someone help me?
I want to store JSON input in my Smart Contract. Like
{ "name":"John" }
when i input { "name":"John" } or "{ \"name\":\"John\" }" ,Remix says, that there is an SyntaxError:
call to Json.getParameter errored: Error encoding arguments: Error: types/values length mismatch (count={"types":1,"values":3}, value={"types":["string"],"values":["{ \",":\"," }"]}, code=INVALID_ARGUMENT, version=abi/5.5.0)
Can someone help me?