不带元素名称的解组json

I´m trying to read a json file and parse into jsonObject in my Go class. The json has a random names and number of elements when I receive it. For example:

{"707514313":1505680270,"1568212945":1505676950,"732898933":1505681884}

So all the examples that I´ve seen that use an struct to define the interface for the unmarshal, where they put the names of the json values, but in my case I cannot do it since I dont know how many and the name of the values of the json.

var settings struct {
    Name1  string `json:"707514313"`
    Name2  string `json:"1568212945"`
    Who knows how many more and with which names?!
}

So I end up unmarshalling with the default interface

func loadFileToJson(filename string) {
    plan, _ := ioutil.ReadFile(filename)
    var data interface{}
    checkError(json.Unmarshal(plan, &data))
    fmt.Println("Data %s ", data)
}

That load in data a (map[String]interface{})

Any idea how to achieve what I want.

EDIT:

I create this struct

type Structure struct {
    Name map[string]uint64
}

And changing the old default by

var jsonObject []Structure
checkError(json.Unmarshal(plan, &jsonObject))

Is giving me this error

json: cannot unmarshal object into Go value of type []main.StructureData %s  []

As commented, you just need to set the field type as map[string]uint64 and implement a few methods to parse the file and get the map value.

See in this playground for some pseudo code: playground

However, depending on your map values, you may need to define the field type as map[string]uint64 or whatever reflecting the json structure, e.g. map[string]interface{} or even a separate embedded struct with nested structure.

Hope this helps.

As @Anzel pointed out your data appears to be perfect for a map[string]uint64. This assumes a couple things, namely that your object keys are always strings (as in your example) and that the values are always uint64 (again as your sample data suggested). As such, unmarshal into that data type instead of interface{}

plan := []byte(`{"707514313":1505680270,"1568212945":1505676950,"732898933":1505681884}`)
var data map[string]uint64
json.Unmarshal(plan, &data)
fmt.Printf("Data is %+v
", data)

OUTPUT

Data is map[1568212945:1505676950 732898933:1505681884 707514313:1505680270]