package main
import (
"encoding/json"
"fmt"
)
type Responses struct {
ID int `json:"id"`
Name string `json:"name"`}
func main() {
var jsonByte = []byte(`[{"ID": 1, "Name": "Пашка"}]`)
var respos []Responses
json.Unmarshal(jsonByte, &respos)
for j := 0; j <= 20; j++ {
respos = append(respos, Responses{ID: j, Name: "Решил"})
}
result, _ := json.Marshal(respos)
fmt.Println(string(result))
}
var response = request.Get("https://site.file.com/fileD=");
Stream responseStream = response.ToMemoryStream();
using(StreamReader tmp = new StreamReader(responseStream))
{
string title = tmp.ReadToEnd().Substring("v:", "<");
}