Popularity
0.6
Stable
Activity
0.0
-
3
1
1
Programming language: Go
License: Apache License 2.0
Tags:
Json
mapslice-json alternatives and similar packages
Based on the "JSON" category.
Alternatively, view mapslice-json alternatives based on common mentions on social networks and blogs.
-
fastjson
Fast JSON parser and validator for Go. No custom structs, no code generation, no reflection. -
json2go
Advanced JSON to Go struct conversion. Provides package that can parse multiple JSON documents and create struct to fit them all. -
go-jsonerror
Go-JsonError is ment to allow us to easily create json response errors that follow the JsonApi spec. -
epoch
Contains primitives for marshaling/unmarshaling Unix timestamp/epoch to/from built-in time.Time type in JSON. -
ask
Easy access to nested values in maps and slices. Works in combination with encoding/json and other packages that "Unmarshal" arbitrary data into Go data-types.
Get performance insights in less than 4 minutes
Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues and can get back to building a great product faster.
Sponsored
scoutapm.com
Do you think we are missing an alternative of mapslice-json or a related project?
README
mapslice-json
Go MapSlice for ordered marshal/ unmarshal of maps in JSON
Example
package main
import (
"encoding/json"
"fmt"
"log"
"github.com/mickep76/mapslice-json"
)
func main() {
ms := mapslice.MapSlice{
mapslice.MapItem{Key: "abc", Value: 123},
mapslice.MapItem{Key: "def", Value: 456},
mapslice.MapItem{Key: "ghi", Value: 789},
}
b, err := json.Marshal(ms)
if err != nil {
log.Fatal(err)
}
fmt.Println(string(b))
ms = mapslice.MapSlice{}
if err := json.Unmarshal(b, &ms); err != nil {
log.Fatal(err)
}
fmt.Println(ms)
}
*Note that all licence references and agreements mentioned in the mapslice-json README section above
are relevant to that project's source code only.