Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Value of json expression is undefined #513

Open
kennethklee opened this issue Dec 12, 2023 · 1 comment
Open

Value of json expression is undefined #513

kennethklee opened this issue Dec 12, 2023 · 1 comment

Comments

@kennethklee
Copy link

kennethklee commented Dec 12, 2023

When running this, value, _ = vm.Run("{}"), the resultant value is undefined instead of an Object.

Other types work:

value, _ = vm.Run("1")
// value.toString() is 1
value, _ = vm.Run("true")
// value.toString() is true
value, _ = vm.Run("[1, 2, 3]")
// value.toString() is 1, 2, 3

As an extension, an error is returned when using { "a": 1 }. Error: (anonymous): Line 1:5 Unexpected token :

@kennethklee
Copy link
Author

I think this is related to #430

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant