Skip to content

"JavaScript error: ap.$get is not a function" while parsing JSON #662

Open
@FlorianUekermann

Description

@FlorianUekermann

Code: https://gopherjs.github.io/playground/#/cCUnbhmC8q

func main() {
	var v map[string][2]float64
	var err = json.Unmarshal([]byte(`{"a": [350, 350]}`), &v)
	fmt.Println(err)
}

Browser: Chrome Version 59.0.3071.115 (Official Build) (64-bit) on Linux
Result: JavaScript error: ap.$get is not a function
Expected Result: <nil>
Making the array a slice fixes the problem.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions