JSON -> JSON::MaybeXS
This commit is contained in:
@ -134,7 +134,7 @@ __PACKAGE__->has_many(
|
||||
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-08-26 12:02:36
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CkU+hbVTmhfOzQhkHJHCsg
|
||||
|
||||
use JSON;
|
||||
use JSON::MaybeXS;
|
||||
|
||||
sub as_json {
|
||||
my $self = shift;
|
||||
@ -148,7 +148,7 @@ sub as_json {
|
||||
"value" => $input->value // "",
|
||||
|
||||
# boolean_columns
|
||||
"emailresponsible" => $self->get_column("emailresponsible") ? JSON::true : JSON::false,
|
||||
"emailresponsible" => $self->get_column("emailresponsible") ? JSON::MaybeXS::true : JSON::MaybeXS::false,
|
||||
);
|
||||
|
||||
return \%json;
|
||||
|
@ -375,7 +375,7 @@ __PACKAGE__->has_many(
|
||||
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-08-26 12:02:36
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:iI44C3BFTo6IsS1tBwWYsg
|
||||
|
||||
use JSON;
|
||||
use JSON::MaybeXS;
|
||||
|
||||
=head2 builds
|
||||
|
||||
@ -423,8 +423,8 @@ sub as_json {
|
||||
"flake" => $self->get_column("flake") // "",
|
||||
|
||||
# boolean_columns
|
||||
"enableemail" => $self->get_column("enableemail") ? JSON::true : JSON::false,
|
||||
"visible" => $self->get_column("hidden") ? JSON::false : JSON::true,
|
||||
"enableemail" => $self->get_column("enableemail") ? JSON::MaybeXS::true : JSON::MaybeXS::false,
|
||||
"visible" => $self->get_column("hidden") ? JSON::MaybeXS::false : JSON::MaybeXS::true,
|
||||
|
||||
"inputs" => { map { $_->name => $_ } $self->jobsetinputs }
|
||||
);
|
||||
|
@ -246,7 +246,7 @@ __PACKAGE__->many_to_many("usernames", "projectmembers", "username");
|
||||
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-08-26 12:02:36
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nKVZ8ZNCZQQ52zbpDAaoQQ
|
||||
|
||||
use JSON;
|
||||
use JSON::MaybeXS;
|
||||
|
||||
sub as_json {
|
||||
my $self = shift;
|
||||
@ -260,8 +260,8 @@ sub as_json {
|
||||
"owner" => $self->get_column("owner") // "",
|
||||
|
||||
# boolean_columns
|
||||
"enabled" => $self->get_column("enabled") ? JSON::true : JSON::false,
|
||||
"hidden" => $self->get_column("hidden") ? JSON::true : JSON::false,
|
||||
"enabled" => $self->get_column("enabled") ? JSON::MaybeXS::true : JSON::MaybeXS::false,
|
||||
"hidden" => $self->get_column("hidden") ? JSON::MaybeXS::true : JSON::MaybeXS::false,
|
||||
|
||||
"jobsets" => [ map { $_->name } $self->jobsets ]
|
||||
);
|
||||
|
Reference in New Issue
Block a user