AHCENAXCkAKDAADnAABRgA5mdfCKZuYJez-NQm0TBMYA4oCAAGQYIAAAAAAEAIAEgAA.argAC0gAAAAAAAAAAAA',
json => {
verbose => 0,
compact => 1,
use_epoch
to find a particular id.
=item *
C<json> is hashref with the following properties used to customize the json format:
=over
=item *
C<verbose> changes the json encoding. By default we omit some f
_consents> to create
a compact json representation. With C<verbose> we will present everything. See L</TO_JSON> for more details.
=item *
C<compact> changes the json encoding. All fields that are a
ing 'options'" unless defined $args{options};
croak "missing 'options.json'" unless defined $args{options}->{json};
my $data = $args{data};
my $data_size = $args{data_size};
$self->{restrictions}->{$purpose_id}->{$restriction_type}
->contains($vendor_id);
}
sub TO_JSON {
my $self = shift;
my %publisher_restrictions;
foreach my $purpose_id ( keys %{ $s
substr($self->{data}, OFFSET ),
data_size => length($self->{data}),
options => { json => ... },
);
say "there is publisher restriction on purpose id 1, type 0 on vendor 284"
ing 'options'" unless defined $args{options};
croak "missing 'options.json'" unless defined $args{options}->{json};
my $data = $args{data};
my $data_size = $args{data_size};
urn is_set( $self->{data}, $id - 1 );
}
sub TO_JSON {
my $self = shift;
my @data = split //, $self->{data};
if ( !!$self->{options}->{json}->{compact} ) {
return [ grep { $data[
>{max_id} ];
}
my ( $false, $true ) = @{ $self->{options}->{json}->{boolean_values} };
if ( !!$self->{options}->{json}->{verbose} ) {
return { map { $_ => $data[ $_ - 1 ] ? $true
ing 'options'" unless defined $args{options};
croak "missing 'options.json'" unless defined $args{options}->{json};
my $data = $args{data};
my $data_size = $args{data_size};
turn \@vendors;
}
sub TO_JSON {
my $self = shift;
return $self->all if !!$self->{options}->{json}->{compact};
my ( $false, $true ) = @{ $self->{options}->{json}->{boolean_values} };
my %map;
if ( !!$self->{options}->{json}->{verbose} ) {
%map = map { $_ => $false } 1 .. $self->{max_id};
}
foreach my $range ( @{ $self->{ranges} } ) {
%map = ( %map, m
ing 'options'" unless defined $args{options};
croak "missing 'options.json'" unless defined $args{options}->{json};
my $core_data = $args{core_data};
my $core_data_size = $args{
@_;
return $self->{publisher_tc};
}
sub TO_JSON {
my $self = shift;
my %tags = (
restrictions => $self->{restrictions}->TO_JSON,
);
if ( defined $self->{publisher_tc}
) {
%tags = ( %tags, %{ $self->{publisher_tc}->TO_JSON } );
}
return \%tags;
}
1;
__END__
=head1 NAME
GDPR::IAB::TCFv2::Publisher - Transparency & Consent String version 2 publishe
ing 'options'" unless defined $args{options};
croak "missing 'options.json'" unless defined $args{options}->{json};
my $data = $args{data};
my $data_size = $args{data_size};
purposes};
return $self->_safe_is_custom_purpose_legitimate_interest_allowed($id);
}
sub TO_JSON {
my $self = shift;
my %consents = map { $_ => $self->_safe_is_purpose_consent_allowed($
urn {
consents =>
$self->_format_json_subsection( \%consents, MAX_PURPOSE_ID ),
legitimate_interests => $self->_format_json_subsection(
\%legitimate_interests, MA
json => $opts{json} || {},
strict => $strict,
);
$options{json}->{date_format} ||= DATE_FORMAT_ISO_8601;
$options{json}->{boolean_values} ||= [ _json_false(), _json_true
poch, $nanoseconds ) = @_;
return $epoch if !!$self->{options}->{json}->{use_epoch};
my $format = $self->{options}->{json}->{date_format};
return $format->( $epoch, $nanoseconds ) if re
, gmtime($epoch) );
}
sub _json_true { 1 == 1 }
sub _json_false { 1 == 0 }
sub _format_json_subsection {
my ( $self, @data ) = @_;
if ( !!$self->{options}->{json}->{compact} ) {
re