paulbartrum / jurassic

A .NET library to parse and execute JavaScript code.
MIT License
868 stars 121 forks source link

JSON.stringify([].length) errors #211

Closed lsim closed 2 years ago

lsim commented 2 years ago

Hi Paul

The error I get is

Unsupported value type: System.UInt32

This happens for any length of the array, by the way.

It doesn't take much to get it working:

JSON.stringify([].length + 0);
lsim commented 2 years ago

Note that this is jurassic 2.1.0.0. It is quite possible that this is already fixed in a newer version, but I couldn't find a related issue, so I made one just in case.

paulbartrum commented 2 years ago

It was indeed still an issue. I've committed a change to fix it. Thanks for the bug report!