added toJSON test