Added server-side json validation