-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically parse String responses #274
Comments
If the return value is If the former, it will make the json error, if the latter, it will lose the meaning of the conversion. |
If the method return type is a string, can't we convert it to utf-8? |
Its just almost all things in the |
Currently, when a method with a return type of "String" is called in Neo Express, the returned value is displayed in hexadecimal format. For instance, the "symbol" method returns "4c494e4b44" instead of the expected value "LINKD".
To fix this, I suggest adding a feature that automatically converts string return types to UTF-8 before displaying them. This would make it easier for developers to read and interpret the output of methods that return strings.
For instance, the "symbol" method in the contract's manifest specifies that it returns a string, as shown in the code snippet below:
However, the current output of the method is in hexadecimal format, which can be difficult to read and interpret:
![Screenshot 2023-03-31 at 10 11 31](https://user-images.githubusercontent.com/38396062/229129176-1dbd52b9-28cb-4024-92e6-dc3b0e468d3a.png)
I suggest that neo-express (and related tools) convert hex to UTF-8, when the method return type is String
The text was updated successfully, but these errors were encountered: