eclipse-ee4j / eclipse-ee4j/jersey
MOXyJsonProvider cannot unmarshall JSON arrays into custom collection types
- Dominant language
- Java
- Stars
- 730
- Forks
- 382
- PR merge metrics
- No merged PRs in 30d
Description
Note: This is a problem in MOXy 2.6\. It's filed against Jersey just to track the progress and the issue should be closed when new MOXy is integrated into Jersey.
Consider you have this JSON:
```
[{"jaxbBean":{"value":"one"}},{"jaxbBean":{"value":"two"}},{"jaxbBean":{"value":"three"}}]
```
Resource Method like:
```
@POST
@Path("custom")
public MyArrayList postCustom(final MyArrayList l) {
return l;
}
```
Where MyArrayList looks like:
```
public class MyArrayList extends ArrayList {
public MyArrayList() {
}
public MyArrayList(final Collection a) {
super(a);
}
}
```
The JSON is unmarshalled as list of lists (MyArrayList of MyArrayLists) but JaxbBeans are not in unmarshalled object.
#### Affected Versions
[2.18]
Contributor guide
Assessment
This issue has not been assessed yet.