Skip to content

Value of json expression is undefined #513

@kennethklee

Description

@kennethklee

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 :

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions