Open yurifariasg opened 9 years ago
Hi Yuri, thanks for using Courier.
@Deliverable
annotated classes currently support every type that is possible to put into a DataMap
, including ArrayList<Integer>
, ArrayList<String>
, ArrayList<DataMap>
, byte[]
, float[]
, long[]
and String[]
. These are the only array types that are able to be put into a DataMap
(see the docs).
If you are having a specific issue with any of these types, then please give me some more details (like the specific type, and a description of the unexpected behaviour you are seeing) and I will look into it further.
You are right, I was not using any of these specific types. I was trying to actually use ArrayLists of another Deliverable. I thought this could be supported since you will eventually parse them into DataMaps and Lists of DataMaps are supported.
I ended up creating a DataMap ArrayList and parsing the Deliverables myself, but it would be great if the library managed that...
Thanks for the clarification. This is something I hadn't thought of, and it definitely should be supported. I'll take it on board.
This has been resolved. The fix has been pushed to this repo, but it's not released yet.
It has occurred to me that other types could also be supported as fields, like anything implementing Serializable
, or an ArrayList
of them. We could also be more generic than ArrayList
by supporting List
, Collection
and Iterable
fields (anything that ArrayList
itself implements or extends from).
I want to give these some thought before releasing the next version. I'll comment here and close this issue when it's released.
Awesome! Thanks. Looking forward to see it in the next version.
Bump on this?
This is in release as of 1.2.0 (latest version is 1.2.1). You can use an ArrayList
of anything that extends Deliverable
.
I think I've just left this open because the advanced stuff isn't done (Serializable
, List
, etc. fields). Pull requests are welcome.
Hi,
So far Courier seems like a great library. I was wondering if lists are going to be supported in the future. I know that DataMap has the support to add DataMap ArrayLists and even ArrayList of certain types like Double or String.
Are you planning to support ArrayList type on Deliverable objects in the future?