package Log::Log4perl::Layout::JSON::Readable;
use strict;
use warnings;
use parent 'Log::Log4perl::Layout::JSON';
our $VERSION = '1.0.3'; # VERSION
# ABSTRACT: JSON layout, but some fields always co
shift;
my $json = $self->SUPER::render(@_);
if (my $first_fields = $self->first_fields) {
for my $key (reverse @{$first_fields}) {
_move_field_first(\$json, $key);
return $json;
}
sub _move_field_first {
my ($json_ref, $key) = @_;
# a JSON value starts with double quotes, and ends with a
# non-backslash-escaped double quotes
${$json_ref} =~ s