Apparently it’s OK to be a pervert in Boston.

The Massachusetts Supreme Judicial Court ruled Wednesday that Michael Robertson of Andover, Mass., (town motto, “We burned witches before burning witches was cool”) was not guilty of taking photographs and video up women’s skirts aboard a Massachusetts Bay Transportation Authority train.

The evidence presented to the court? Police caught him doing it.

Unfortunately for ladies who wear skirts in Boston, since Robertson’s victims were wearing skirts in a public place, and their private parts have no right to privacy. I’m not saying the Massachusetts Supreme Judicial Court is composed mostly of lookie-loos (I’m not saying it’s not), but the justices were put in a bad position. The Massachusetts Peeping Tom law only protects people in private areas, like bathrooms and tanning booths; it doesn’t protect people who have the audacity to go out in public.

The court had no choice but to side with the perv behind Camera Number One, even though the headline, “Mass. high court: Subway upskirt photos not illegal,” makes you feel all icky. (The legislature and the governor acted quickly late in the week to approve a new anti-upskirt law.)

Courts are often put in a bad light by the press, sometimes for good reason. Such as the “affluenza teen.”

In 2013, Fort Worth teenager Ethan Couch, while drunker than a congressman, drove through a crowd of people, killing four of them, including a youth minister, and the person who may have one day cured cancer (just speculation on my part).

The family’s psychologist offered such a convincing argument to the court (the boy’s family was so rich he wasn’t responsible for his actions), that Couch got 10 years probation. The shrink even called the boy’s condition “affluenza.”

And courts are occasionally put in a bad light by the press simply because they did the right thing. Like Snyder v. Phelps.

In 2011, Albert Snyder, the father of Marine Matthew Snyder, who had been killed in Iraq, sued the Westboro Baptist Church (church motto, “You can’t spell ‘Whatever’ without hate”) after the group protested Matthew’s funeral, holding signs that read, among other things, “Thank God for dead soldiers.”

A poll among people with decency (totally made up, but most probably accurate) ranked “getting the Westboro Baptist Church to shut the hell up” just below “invent a time machine and kill Hitler” on its to-do list.

When Snyder v. Phelps went to the U.S. Supreme Court, the court decided that public speech in a public place (in this case a sidewalk), even “outrageous” speech, is protected by the First Amendment.

The court ruled correctly, no matter how badly it tastes.

Which brings us to Rachel Canning. Oh, cute little Rachel Canning. She looks so nice in her pictures.

This 18-year-old honor student at Morris Catholic High School left home two days before her 18th birthday because, well, she just couldn’t stand it anymore. Oh, my God, like, I hate my parents so much. They won’t let me drink, they gave me a curfew, they want me to do chores around the house. Chores? Seriously? Me do chores? As if.

Now living with friends, she sued her parents for $654 in weekly child support, to finish paying her private high school tuition, and attorney fees.

The judge in this case, Peter Bogaar, basically told Canning to grow up and tossed out the case. Good for him.

Let’s hope the judge in the recently filed $1.5 million “McDonald’s only gave me one napkin” lawsuit has as much sense as Bogaar.

Jason Offutt writes this column for The Examiner.