I had a Pyjama cardinal. It was a strange little fish, as it would prefer to eat pelleted food over almost anything else. Sometimes it would eat mysis, bloodworms, and brine, but it wanted the lower protein Tetra Marine granules/pellets (no other fish would touch the stuff, not even the shrimp would). I bought pelleted Formula One for it, but then I had my disaster with the heater...
I did see it eating shrimp larvae though, and it probably ate copepods and amphipods in the tank. It was fat, definitely not malnourished (had it for 5+ years), but wouldn't touch flake, only pellets!