ackage ODS::Serialize::JSON;
use YAOO;
use JSON;
has pretty => isa(boolean(1)), lazy;
has file_suffix => isa(string('json'));
has json => isa(object(1)), coerce => sub { JSON->new->pretty($_[0]->p
retty); };
sub parse {
my ($self, $data) = @_;
return $self->json->decode($data);
}
sub stringify {
my ($self, $data) = @_;
return $self->json->encode($data);
}
1;
ODS::Storage::File::JSON;
use YAOO;
use ODS::Utils qw/load/;
extends 'ODS::Storage::File';
use ODS::Serialize::JSON;
has _serialize_class => isa(object('ODS::Serialize::JSON')), coerce(sub {
my
rows ? ODS::Iterator->new(table => $self->table) : $self->all;
# this only works for JSON and YAML, CSS and JSONL we can stream/read rows/lines instead of reading/loading
# all into memory.
my $se
rows ? ODS::Iterator->new(table => $self->table) : $self->all;
# this only works for JSON and YAML, CSS and JSONL we can stream/read rows/lines instead of reading/loading
# all into memory.
my $se
rows ? ODS::Iterator->new(table => $self->table) : $self->all;
# this only works for JSON and YAML, CSS and JSONL we can stream/read rows/lines instead of reading/loading
# all into memory.
my $se