FasterXML / FasterXML/jackson-databind
Unsigned integers
- Ngôn ngữ chính
- Java
- Star
- 3.7k
- Fork
- 1.5k
- Merge trung bình
- 3 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 28
Mô tả
**Is your feature request related to a problem? Please describe.**
There is no clear and efficient way to exchange JSON and CBOR with other programming languages when those other programming languages use unsigned integer fields.
**Describe the solution you'd like**
Would it be possible to have an annotation on integer fields and fields holding integer arrays that would cause Jackson to treat them as unsigned numbers?
**Usage example**
```java
@JsonUnsigned int field;
@JsonUnsigned long[] data;
```
**Additional context**
Java has unsigned arithmetic since Java 8. See for example [Long.parseUnsignedLong()](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Long.html#parseUnsignedLong(java.lang.String)). CBOR has built-in support for unsigned integers. Byte arrays frequently contain 8-bit unsigned values.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.