Are the rules different if suing the city of New York for an injury resulting from a defect in a public sidewalk or building?

Yes, the rules in New York give a lot of advantage to municipalities. So in order to successfully sue the city of New York, it's necessary to show that the defective condition was known and reported in writing to the city of New York before your accident. Unlike a private party who is responsible whether or not they were given written notice. Now the good news in New York City is that property owners other than one, two, or three family houses, the commercial buildings that are a budding sidewalks, public sidewalks are responsible for maintaining them in a safe condition and are answerable to an injured party if they don't keep them in safe condition. So you can sue the property owner budding the sidewalk if it's a commercial or large residential building. But to sue the city itself is very difficult.