Dev k

you need try catch this line. if user write unproper json it throw exception. it shouldn't. maybe it should just show some alert() msg for now? later we could check it in any key press and make submit button disabled. and event body element with red border / similar things.