You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.
Finally getting around to looking closely at this. In order to maintain parity with Gson, if a class implements the list interface or is an array, we will use the logic from Gson which serializes all lists and arrays the same way:
and as there is no way to represent a list with extra fields, only lists declared like above will be able to be parsed into objects that extend the List interface.
The easiest implementation would be to change ElementUtils.isSupportedElementKind to return false if the element implements the list interface or is an array. However, we can remove the need to do reflective instantiation if we modify StagProcessor.generateTypeAdapter to do the check instead. Then, an implementation of AdapterGenerator can be created that handles types that extend the list interface.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Issue Summary
A server response such as
maps to a model like:
stag fails generating code these top-level array objects.
Reproduction Steps
See above
Expected Behavior
Extending ArrayList should produce valid code
Actual Behavior
Fails to generate.
The text was updated successfully, but these errors were encountered: