Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
for example here:
import (
"encoding/json"
"io/ioutil"
)
func GetSignatures() []string {
// тут можно удобно перегонять json в структуры https://mholt.github.io/json-to-go/
type JsonGo struct {
Signatures []string `json:"signatures"`
SerializedTransaction []int `json:"serializedTransaction"`
}
var st JsonGo
path := "какой-то-путь/file.json"
byteValue, err := ioutil.ReadFile(path)
if err != nil {
panic(err)
}
err = json.Unmarshal(byteValue, &st)
if err != nil {
panic(err)
}
return st.Signatures
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question