This novel is a classic of Serbian literature, blending the legend of the hajduks (outlaws/rebels) with the reality of 18th-century Belgrade under Austrian occupation.
It sounds like you are looking for a breakdown of the famous novel "Hajduk u Beogradu" by Jovan Janićije Popović (also known as Janićije Popović).