the first line.
=cut
=head1 NAME
Log::Any::Adapter::DERIV - standardised logging to STDERR and JSON file
=begin markdown
[
=end markdown
=head1 SYNOPSIS
use Log::Any;
# print text log to STDERR, json format when inside docker container,
# colored text format when STDERR is a tty, non-colored
use Log::Any::Adapter ('DERIV', stderr => 'json')
#specify the json log name
use Log::Any::Adapter ('DERIV', json_log_file => '/var/log/program.json.log');
=head1 DESCRIPTION
Applies some o
dows_service_ext->TO_JSON
Helper for JSON encoders.
=item $windows_service_ext->to_hash
Return the object HASH.
=item $windows_service_ext->to_string
Encode the object in JSON.
=item $windows_se
rvice_ext->validate
Validate the object using JSON Schema (see L<STIX::Schema>).
=back
=head1 SUPPORT
=head2 Bugs / Feature Requests
Please report any bugs or feature requests through the issue
rict;
use warnings;
use LWP::UserAgent;
use LWP::Protocol::https;
use HTTP::Request::Common;
use JSON;
use List::Util qw/min/;
use POSIX qw/floor/;
use Net::Payjp::Account;
use Net::Payjp::Charge;
u
ethods are generally named after the object name and the acquisition method.
This method returns json objects for responses from the API.
=head1 new Method
This creates a new Payjp api object. The
ayjp-Client-User-Agent' => JSON->new->encode($client),
);
my $res = $ua->request($req);
my $code = $res->code;
if($code == 200){
my $obj = $self->_to_object(JSON->new->decode($res->conten
~ /$BASE64_REGEXP/;
return encode_base64($bin, '');
}
sub to_string { shift->value }
sub TO_JSON { shift->value }
1;
=encoding utf-8
=head1 NAME
STIX::Common::Binary - Binary type
=head1
em value
=back
=head2 HELPERS
=over
=item $binary->TO_JSON
Helper for JSON encoders.
=item $binary->to_string
Encode the object in JSON.
=back
=head1 SUPPORT
=head2 Bugs / Feature Requests
stant SCHEMA =>
'http://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/observables/file.json';
use constant PROPERTIES => (
qw(type id),
qw(spec_version objec
le->TO_JSON
Encode the object in JSON.
=item $file->to_hash
Return the object HASH.
=item $file->to_string
Encode the object in JSON.
=item $file->validate
Validate the object using JSON Schema
nt SCHEMA =>
'http://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/observables/email-addr.json';
use constant PROPERTIES => (
qw(type id),
qw(spec_version ob
=over
=item $email_addr->TO_JSON
Encode the object in JSON.
=item $email_addr->to_hash
Return the object HASH.
=item $email_addr->to_string
Encode the object in JSON.
=item $email_addr->validat
e
Validate the object using JSON Schema
(see L<STIX::Schema>).
=back
=head1 SUPPORT
=head2 Bugs / Feature Requests
Please report any bugs or feature requests through the issue tracker
at L<https
nstant SCHEMA =>
'http://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/sdos/indicator.json';
use constant PROPERTIES => (
qw(type spec_version id created modifie
=over
=item $indicator->TO_JSON
Encode the object in JSON.
=item $indicator->to_hash
Return the object HASH.
=item $indicator->to_string
Encode the object in JSON.
=item $indicator->validate
ant SCHEMA =>
'http://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/observables/directory.json';
use constant PROPERTIES => (
qw(type id),
qw(spec_version ob
=over
=item $directory->TO_JSON
Encode the object in JSON.
=item $directory->to_hash
Return the object HASH.
=item $directory->to_string
Encode the object in JSON.
=item $directory->validate
ant SCHEMA =>
'http://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/observables/mac-addr.json';
use constant PROPERTIES =>
(qw(type id), qw(spec_version object_m
_JSON
Encode the object in JSON.
=item $mac_addr->to_hash
Return the object HASH.
=item $mac_addr->to_string
Encode the object in JSON.
=item $mac_addr->validate
Validate the object using JSON
m $http_request_ext->TO_JSON
Helper for JSON encoders.
=item $http_request_ext->to_hash
Return the object HASH.
=item $http_request_ext->to_string
Encode the object in JSON.
=item $http_request_
ext->validate
Validate the object using JSON Schema (see L<STIX::Schema>).
=back
=head1 SUPPORT
=head2 Bugs / Feature Requests
Please report any bugs or feature requests through the issue tracke
SCHEMA =>
'http://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/observables/x509-certificate.json';
use constant PROPERTIES => (
qw(type id),
qw(spec_version
$x509_certificate->TO_JSON
Encode the object in JSON.
=item $x509_certificate->to_hash
Return the object HASH.
=item $x509_certificate->to_string
Encode the object in JSON.
=item $x509_certific
ate->validate
Validate the object using JSON Schema
(see L<STIX::Schema>).
=back
=head1 SUPPORT
=head2 Bugs / Feature Requests
Please report any bugs or feature requests through the issue tracke
nstant SCHEMA =>
'http://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/observables/url.json';
use constant PROPERTIES =>
(qw(type id), qw(spec_version object_mar
$url->TO_JSON
Encode the object in JSON.
=item $url->to_hash
Return the object HASH.
=item $url->to_string
Encode the object in JSON.
=item $url->validate
Validate the object using JSON Schema
O_JSON
Helper for JSON encoders.
=item $ntfs_ext->to_hash
Return the object HASH.
=item $ntfs_ext->to_string
Encode the object in JSON.
=item $ntfs_ext->validate
Validate the object using JSON
SCHEMA =>
'https://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/common/marking-definition.json#/definitions/tlp_white';
has +id => (is => 'ro', defaul
$tlp->TO_JSON
Helper for JSON encoders.
=item $tlp->to_hash
Return the object HASH.
=item $tlp->to_string
Encode the object in JSON.
=item $tlp->validate
Validate the object using JSON Schema (
stant SCHEMA =>
'http://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/observables/mutex.json';
use constant PROPERTIES =>
(qw[type id], qw[spec_version object_ma
x->TO_JSON
Encode the object in JSON.
=item $mutex->to_hash
Return the object HASH.
=item $mutex->to_string
Encode the object in JSON.
=item $mutex->validate
Validate the object using JSON Sche
nt SCHEMA =>
'http://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/observables/domain-name.json';
use constant PROPERTIES => (
qw(type id),
qw(spec_version o
ver
=item $domain_name->TO_JSON
Encode the object in JSON.
=item $domain_name->to_hash
Return the object HASH.
=item $domain_name->to_string
Encode the object in JSON.
=item $domain_name->valid
ate
Validate the object using JSON Schema
(see L<STIX::Schema>).
=back
=head1 SUPPORT
=head2 Bugs / Feature Requests
Please report any bugs or feature requests through the issue tracker
at L<htt
bitMQ;
#define AMQP_STATUS_UNKNOWN_TYPE 0x500
#ifdef USE_LONG_DOUBLE
/* stolen from Cpanel::JSON::XS
* so we don't mess up double => long double for perls with -Duselongdouble */
#if define
SCHEMA =>
'https://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/common/marking-definition.json#/definitions/tlp_amber';
has +id => (is => 'ro', defaul
$tlp->TO_JSON
Helper for JSON encoders.
=item $tlp->to_hash
Return the object HASH.
=item $tlp->to_string
Encode the object in JSON.
=item $tlp->validate
Validate the object using JSON Schema (
=over
=item $socket_ext->TO_JSON
Helper for JSON encoders.
=item $socket_ext->to_hash
Return the object HASH.
=item $socket_ext->to_string
Encode the object in JSON.
=item $socket_ext->validat
ant SCHEMA =>
'http://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/observables/software.json';
use constant PROPERTIES => (
qw(type id),
qw(spec_version obj
_JSON
Encode the object in JSON.
=item $software->to_hash
Return the object HASH.
=item $software->to_string
Encode the object in JSON.
=item $software->validate
Validate the object using JSON