Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Unable to deserialize collections #18

@henryju

Description

@henryju

Any API returning a collection fail to be deserialized.

Can not deserialize instance of java.util.ArrayList out of START_OBJECT token
at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@7586beff; line: 1, column: 1]

This is because ApiResourceEntityProvider will unwrap collections when the target object is of type java.util.List, but generated code make use of ArrayList. And List != ArrayList.

I suggest to fix the generator to replace ArrayList by List (this is a good practice in Java to not expose implementation in APIs).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions