Skip to content
This repository was archived by the owner on Oct 19, 2024. It is now read-only.
This repository was archived by the owner on Oct 19, 2024. It is now read-only.

NSNumber encoding #75

@makleso6

Description

@makleso6

Hi! I'll try to encode NSNumber with value 1673520803 but in result I see -6493. It seams there is a bug when encoding NSNumber in

case "i": try container.encode(nsnumber.int16Value)

According documentation objCType "I" is An int
https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtTypeEncodings.html
I think in this case should use
case "i": try container.encode(nsnumber.intValue)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions