JSON
import (
"encoding/json"
"strings"
"fmt"
)Parsing Into Struct
type App struct {
Id string `json:"id"`
Title string `json:"title"`
}
data := []byte(`
{
"id": "k34rAT4",
"title": "My Awesome App"
}
`)
var app App
err := json.Unmarshal(data, &app)Struct => Json
Simpler Parsing Into Struct
Printing Byte Array
Decoder
Last updated