Skip to content

Commit cb0d740

Browse files
committed
feat(BigInt): serialize bytes as base64
1 parent 8f95c36 commit cb0d740

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ num-traits = "0.2"
1616
num-derive = "0.4"
1717
serde = { version = "1.0", features = ["derive"] }
1818
serde_json = "1.0"
19+
serde_bytes = "0.11.17"
1920
serde_repr = "0.1"
2021

2122
[lib]

src/types.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,9 @@ pub enum ValueRecord {
387387
place: Place,
388388
},
389389
BigInt {
390-
b: Vec<u8>, // Big endian
390+
#[serde(with = "serde_bytes")]
391+
b: Vec<u8>, // Base64 encoded bytes of a big-endian unsigned integer
392+
negative: bool,
391393
type_id: TypeId,
392394
},
393395
}

0 commit comments

Comments
 (0)