Skip to content
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

Can this be combined with json struct decoding and encoding struct to json? #110

Open
piersonleo opened this issue Mar 30, 2023 · 0 comments

Comments

@piersonleo
Copy link

For example I have this struct and json string

struct Foo: Codable{
    var v: BigInt
}

let jsonString = "{\"v\": 410100000008994450000000000}"

I had tried to decode it but I got this error. So I created this post to confirm.

typeMismatch(Swift.Array<Any>, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "v", intValue: nil)], debugDescription: "Expected to decode Array<Any> but found a number instead.", underlyingError: nil))
@piersonleo piersonleo changed the title Can this be combined with json struct decoding? Can this be combined with json struct decoding and encoding struct to json? Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant