code: func toJSON(i interface{}) (string, error) {
  	result, err := json.Marshal(i)
  	if err != nil {
  		return "", errors.Wrap(err, "toJSON")
  	}
  	return string(bytes.TrimSpace(result)), err
  }
docs: // toJSON converts the given structure into a deeply nested JSON string.