ToJSON: serialize string_columns to JSON
If the column is undefined, then it should be an empty string according to your API spec.
This commit is contained in:
@ -18,6 +18,10 @@ sub TO_JSON {
|
||||
$json{$column} = $self->get_column($column);
|
||||
}
|
||||
|
||||
foreach my $column (@{$hint->{string_columns}}) {
|
||||
$json{$column} = $self->get_column($column) // "";
|
||||
}
|
||||
|
||||
foreach my $column (@{$hint->{boolean_columns}}) {
|
||||
$json{$column} = $self->get_column($column) ? JSON::true : JSON::false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user