How golang parses unknown format json strings (possibly json objects, possibly json arrays)

I. parsing json array strings

    data:= `[
        {
            "name": "aaa",
            "id":   "54546221"
        },
        {
            "name": "bbb",
            "id":   "89875646"
        }
    ]`
`

dataArr := []interface{}{}
err := json.Unmarshal([]byte(data), &dataArr)

II. Parsing json object string

    data:= `{
            "name": "aaa",
            "id":   "54546221"
        }`
`
dataArr := map[string]interface{}{}
err := json.Unmarshal([]byte(data), &dataArr)

how do I parse an data json string without knowing the data format?

Sep.12,2021

  IsObject () .  					
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e59a46-4555c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e59a46-4555c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?