stretchr / objx

Go package for dealing with maps, slices, JSON and other data.
MIT License
701 stars 75 forks source link

dealing with slices #116

Closed Digl closed 2 years ago

Digl commented 2 years ago

when I have the following json: [{"key": "value"}.{"key2": "value2"}]

objx.FromJSON fails with the error: cannot unmarshal array into Go value of type objx.Map

how should this be handled? I am using v.0.3.0

geseq commented 2 years ago

use objx.FromJSONSlice()

geseq commented 2 years ago

I've also tagged the latest version so godoc is updated to reflect this and some of the other recent updates