code: func (b *Backend) decodeResults(results []*tasks.TaskResult) []*tasks.TaskResult {
  	l := len(results)
  	jsonResults := make([]*tasks.TaskResult, l, l)
  	for i, result := range results {
  		jsonResult := new(bson.M)
  		resultType := reflect.TypeOf(result.Value).Kind()
  		if resultType == reflect.String {
  			err := json.NewDecoder(strings.NewReader(result.Value.(string))).Decode(&jsonResult)
  			if err == nil {
  				jsonResults[i] = &tasks.TaskResult{
  					Type:  "json",
  					Value: jsonResult,
  				}
  				continue
  			}
  		}
  		jsonResults[i] = result
  	}
  	return jsonResults
  }
docs: // decodeResults detects & decodes json strings in TaskResult.Value and returns a new slice