JSON buffer parse working