Rio de Janeiro may be extremely beautiful - it was recently chosen as the site of the 2016 Olympic Games. However, it's not without imperfections, and in Rio's case, corruption and crime stand out like a wolf in a flock of sheep.
As a general rule, never trust anyone you find in the city, whether it be clerks, moneychangers, cabbies, hawkers, streetchildren, beggars, fellow tourists, or even the police. Chances are that you'll get ripped off if you do, as swindlers are sometimes in cohort with the law enforcers themselves.
Many Brazilians would try to befriend you and get you to hangout with them, after which they expect you to pay for all the expenses incurred. It doesn't sound good, but many locals would see you as a walking and breathing wallet, especially if you look rich or well-off.
Also, mugging is widespread, so never put all your money in the same place. Hold on to your bags and keys, don't venture off at night, don't get into dense crowds, don't head to the dingy parts of the city, keep your eyes peeled, and above all, try to blend in so you'll not be a target.
Very true but just for some balance, Brazilians can also be very warm hospitable and honest, Enjoy this amazing country!