een set to C<text/html> with
L</expect_mime_type>. The C<html> option is incompatible with the
L</json> and L</png> options.
=item HTTP_COOKIE
$options{HTTP_COOKIE} = 'nice=day';
$test->ru
riable. See also L</content_length>.
=item json
$options{json} = 1;
$test->run (\%options);
Validate the body of the output as JSON using L<JSON::Parse>. The
validation is run after decom
a warning
message if the mime type has not been set to C<application/json> or
C<text/plain> with L</expect_mime_type>. The C<json> option is
incompatible with the L</html> and L</png> options.
=item
elsif ($options->{json} && ! $self->{no_warn}) {
my $mime_type = $self->{mime_type};
if ($mime_type) {
if ($mime_type ne 'text/plain' && $mime_type ne 'application/json') {
carp "Your exp
e_type is not valid for JSON";
}
}
else {
carp "There is no expected mime type, use expect_mime_type ('application/json') or expect_mime_type ('text/plain') for JSON output";
}
}
ml} || $options->{json}) {
carp "Contradictory options png and json/html";
}
}
elsif ($options->{html}) {
if ($options->{json}) {
carp "Contradictory options json and html";
}