FasterXML / FasterXML/jackson-databind

Unsigned integers

Abierto
#3,359 1 comentario 5 reacciones 0 asignados Ver en GitHub
most-wanted
Lenguaje dominante
Java
Estrellas
3.7k
Forks
1.5k
Merge medio
3 d 6 h
PR fusionados (30 d)
28

Descripción

**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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.