In my opinion, for an outbuilding, number 2 lumber is fine for the joists. It means that knots are allowed in the board, and some edges may be "live" meaning exposed bark. If you're selective when picking through the pile, you can minimize both. Make sure to observe the "crown" of each board...