Arrays in webhooks previous attributes parsed as Object[]
See original GitHub issueHi,
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.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
How to Parse JSON style key value pair arrays into Zapier ...
Type in this simple bit of code. Then the JSON properties will become available in your tests ! J.
Read more >Trying to extract JSON array info - Power Platform Community
Solved: Hi all, I am trying to extract certain information from a JSON array (that is provided via a webhook). Basically its a...
Read more >Access key values inside Array (POST webhook from parsio.io)
Hello, I receive the following data as JSON via POST webhook from parsio.io: ... var keys = Object.keys($json["body"]["payload"]["parsed"]); ...
Read more >How to deserialize array of objects in incoming webhook ...
One more thing to try: save the response as a created variable to convert it to a string and then try to parse...
Read more >How to parse a JSON object with nested arrays in google ...
So in above sample script, each values are put in an array. ... to retrieve the values of Shape and _pdf in properties...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Fixed in stripe-java 9.0.0.
Quick update: this didn’t make it into the newly released major version 8.0.0, but it’s still on our roadmap and will be fixed in a future major version.