Skip to content

Arrays in webhooks previous attributes parsed as Object[] #605

@Flo354

Description

@Flo354

Hi,

I am using stripe-java version 7.1.0 and I am currently experiencing something weird with Webhooks.
When getting event.getData().getPreviousAttributes(), I obtain a Map<String, Object> which is fine.

Within this map, if I am getting the field verification, is it also a Map<String, Object>.
But why an array, like verification -> fields_needed is an Object[] instead of a List<Object>.

Actually, I am asking this question to myself, because with my JSON library (Jackson JSON), When I am using this code:

String jsonStr = "some json";
Map<String, Object> result = mapper.readValue(jsonStr, Map.class);

When I am recovering verification -> fields_needed, I am getting an ArrayList<Object>. And I find this more natural.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions