code: func parseJSON(input []byte) (*logEntry, error) {
  	var raw map[string]interface{}
  	entry := &logEntry{}
  
  	err := json.Unmarshal(input, &raw)
  	if err != nil {
  		return nil, err
  	}
  
  	// Parse hclog-specific objects
  	if v, ok := raw["@message"]; ok {
  		entry.Message = v.(string)
  		delete(raw, "@message")
  	}
  
  	if v, ok := raw["@level"]; ok {
  		entry.Level = v.(string)
  		delete(raw, "@level")
  	}
  
  	if v, ok := raw["@timestamp"]; ok {
  		t, err := time.Parse("2006-01-02T15:04:05.000000Z07:00", v.(string))
  		if err != nil {
  			return nil, err
  		}
  		entry.Timestamp = t
  		delete(raw, "@timestamp")
  	}
  
  	// Parse dynamic KV args from the hclog payload.
  	for k, v := range raw {
  		entry.KVPairs = append(entry.KVPairs, &logEntryKV{
  			Key:   k,
  			Value: v,
  		})
  	}
  
  	return entry, nil
  }
docs: // parseJSON handles parsing JSON output