bers = $class->SUPER::get_class_members();
return (@super_members, @class_members);
}
sub TO_JSON {
my $self = shift;
my $this = { };
my @ancestors = $self->get_class_ancestors();
ue = encode_utf8($self->{'val'});
$node->appendText($value);
return $node;
}
sub TO_JSON {
my $self = shift;
my $class = ref($self);
$class =~ s/VMOMI:://;
return {_clas
rint $vm->name . "\n"; # TestVM2
=head2 JSON
Support for L<JSON::XS|https://metacpan.org/pod/JSON::XS> object serialization is available through the
TO_JSON method on the SDK classes, which may be
ration with NoSQL
databases.
$coder = JSON::XS->new->convert_blessed->pretty;
$encoded_json = $coder->encode($session);
print $encoded_json;
{
"lastActiveTime" : "2017-05-
llCount" : "0",
"_class" : "UserSession"
}
Two additional properties are added to the JSON encoded string, B<_class> and B<_ancestors>. B<_class> is the
object's class name and B<_ancesto
ue = encode_utf8($self->{'val'});
$node->appendText($value);
return $node;
}
sub TO_JSON {
my $self = shift;
my $class = ref($self);
$class =~ s/VMOMI:://;
return {_clas
bers = $class->SUPER::get_class_members();
return (@super_members, @class_members);
}
sub TO_JSON {
my $self = shift;
my $this = { };
my @ancestors = $self->get_class_ancestors();
$node->addChild($c_node);
}
}
}
return $node;
}
sub TO_JSON {
my $self = shift;
my $this = { };
my @ancestors = $self->get_class_ancestors();
or 'blessed' ManagedObjectReferences while letting
# other types fall through to the JSON::XS processor.
if ( $type eq 'ManagedObjectReference' ) {
if (blessed
$node->addChild($c_node);
}
}
}
return $node;
}
sub TO_JSON {
my $self = shift;
my $this = { };
my @ancestors = $self->get_class_ancestors();
or 'blessed' ManagedObjectReferences while letting
# other types fall through to the JSON::XS processor.
if ( $type eq 'ManagedObjectReference' ) {
if (blessed