code: func (l *Line) UnmarshalJSON(data []byte) error {
  	var points [][2]float64
  
  	err := json.Unmarshal(data, &points)
  	if err != nil {
  		return err
  	}
  
  	if len(points) > 2 {
  		return errors.New("geo: too many points to unmarshal into line")
  	}
  
  	if len(points) < 2 {
  		return errors.New("geo: not enough points to unmarshal into line")
  	}
  
  	l.a = Point{points[0][0], points[0][1]}
  	l.b = Point{points[1][0], points[1][1]}
  
  	return nil
  }
docs: // UnmarshalJSON enables lines to be decoded as JSON using the encoding/json package.