Added json functionality to Card class.