Popularity
1.7
Declining
Activity
0.0
Stable
16
1
7

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.

Do you think we are missing an alternative of mapslice-json or a related project?

Add another 'JSON' Package

README

GoDoc Go Report Card License Coverage Status Build Status

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.