question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Arrays in webhooks previous attributes parsed as Object[]

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ob-stripecommented, Apr 9, 2019

Fixed in stripe-java 9.0.0.

0reactions
ob-stripecommented, Mar 20, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found