a few years ago i pulled up on the sidewalk to avoid being crushed by a bus pulling into a bus stop. cops told me to just explain it to the judge and he'd probably let me off. i explained that yes, i was on the sidewalk, but these were the circumstances, the cops said this and that, etc....
and i had to pay a $100 fine.
the guy next to me was riding in my neighborhood under the bqe and a cop car was blocking the exit, so he went up on the sidewalk to get around him. he got a ticket, they told him to explain to the judge, etc. he did, and he got off with no fine.
so i have no real advice here except see if you get lucky. also, it's not cool to ride on the sidewalk.
be prepared for a long line of people in front of you in court caught with open containers. it's kind of funny becuase they say what brand of booze you were drinking.