neatjson
make it neat to use "encoding/json" in golang.
go get github.com/yyle88/neatjson
- Convert Go structures to indented JSON strings.
- Format JSON data from raw strings, byte arrays.
Here's an example of how to format a Go data structure into a indented JSON string:
package main
import (
"fmt"
"github.com/yyle88/neatjson/neatjsons"
)
func main() {
arg := map[string]any{"a": "abc", "n": 123}
res := neatjsons.S(arg)
fmt.Println(res)
}
Output:
{
"a": "abc",
"n": 123
}
neatjson
is open-source and released under the MIT License. See the LICENSE file for more information.
Welcome to contribute to this project by submitting pull requests or reporting issues.
If you find this package helpful, give it a star on GitHub!
Thank you for your support!
Happy Coding with neatjson
! 🎉
Give me stars. Thank you!!!