Adding json constraint