Skip to content

Add CBOR support for BigInteger and BigDecimal types #4473

@AmitKulkarni23

Description

@AmitKulkarni23

Problem

BigInteger and BigDecimal types currently fail at codegen time when used with CBOR protocol.

Specification Requirements

According to the Smithy RPC v2 CBOR spec:

  • BigInteger: Should use Major Type 6, tags 2 (unsigned bignum) or 3 (negative bignum)
  • BigDecimal: Should use Major Type 6, tag 4 (decimal fraction)

Current State

  • aws-smithy-cbor doesn't expose methods for these CBOR tags
  • The underlying minicbor library supports tags (used internally for timestamps)
  • Codegen currently fails with an error when BigInteger/BigDecimal are used with CBOR

Related

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