Skip to content

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

Description

@piersonleo

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))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions