long pending JS to JSON conversion issue - nested arrays become maps
See original GitHub issuea very annoying issue that has been around since the beginning, but fortunately only affects a relatively rare case when JSON is constructed on the JavaScript side (typically in an eval
or JS function
) and where there are nested arrays, they become JSON with keys like 0
, 1
, 2
, etc. just figured out a possible fix. opening this issue to track, and this could be a breaking change for some teams
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
long pending JS to JSON conversion issue - nested ... - GitHub
a very annoying issue that has been around since the beginning, but fortunately only affects a relatively rare case when JSON is constructed ......
Read more >Convert JSON array with nested arrays (tree) to flat JSON array
The code works well, but I would like to get rid of the extra steps to create a list with the names using...
Read more >Resolving Nested Promise Arrays - Pat Migliaccio
Resolving data from separate resources in JavaScript may lead to a bit of asynchronous complexity when working with nested Promise arrays.
Read more >How to Run an Asynchronous Function in Array.map()
Array.map() is a synchronous operation and runs a function on each element in the array resulting in a new array with the updated...
Read more >JSON.stringify() - JavaScript - MDN Web Docs
The JSON.stringify() method converts a JavaScript value to a JSON ... longer than that) is inserted before every nested object or array.
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
The commit 38ad211 seems to break java interop for us, but maybe we’re doing something incorrectly so let me know. It goes like this:
In our karate-config.js, we add a reference to a Java type (which is actually a Kotlin object) that has a function we want to call in our scenarios, e.g. karate-config.js
Then in our scenario:
I’ve built the commit preceding 38ad211 and it works fine, but when using a build of 38ad211 we get
javascript evaluation failed: testDataSetup.createTestUserInDb is not a function in <eval> at line number 1
I’ll have a bit of a debug with the changes in 38ad211 but also maybe you know off the bat what’s wrong?
👍 looks good.