json parser with queue kind of callbacks (designed under influence of jsmn)