Skip to content

Using JSON strings as an ABI #3990

Answered by ricmoo
AlvaroLuken asked this question in Q&A
Discussion options

You must be logged in to vote

If passing a string in as an ABI, it must be valid JSON. To check if your string is valid, you can use JSON.parse in your code, in which case you can just pass the parsed object. :)

The above JSON is invalid because it has a trailing comma (,) in the 8th line. It looks like it was likely cut-and-paste from a larger ABI, but it's important to note the JSON is very strict as to its grammar.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ricmoo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
investigate Under investigation and may be a bug. v6 Issues regarding v6
2 participants
Converted from issue

This discussion was converted from issue #3984 on April 19, 2023 06:53.