San Francisco DA announced that he won't prosecute certain crimes like public camping or public urination (second source). "San Francisco's new district attorney has chosen social justice over the rule of law" according to one opinion.
Can he do that? Is it legal for a DA to effectively decriminalize a class of crimes, and therefore substitute the laws deliberated and adopted by legislature and affirmed by courts with his own vision of social justice?
I thought DAs, as well as judges, are sworn to uphold the law as it stands rather than replace it with their own.