*throw input error on passing wrong json format