Group
Extension

Matches 1

JSON-ize ( M/MA/MAJENSEN/JSON-ize-0.202.tar.gz, MAJENSEN, 2019; MetaCPAN )
JSON-ize/lib/JSON/ize.pm ( view source; MetaCPAN )
package JSON::ize;
use base Exporter;
use JSON::MaybeXS;
use YAML::Any qw/Dump Load LoadFile DumpFile/;
use Try::Tiny;
use strict;
use warnings;

our $JOBJ = JSON::MaybeXS->new();
our $YOBJ;
our $_las
t_out = "";

our @EXPORT = qw/jsonize jsonise J yamlize yamlise Y parsej pretty_json ugly_json/;
our $VERSION = "0.202";

sub jobj { $JOBJ }

sub jsonize (;$) {
  my $inp = shift;
  if (!defined $inp)
p) : jobj()->encode($inp);
  }
  else { # scalar: decode if looks like json or yaml, or slurp if filename
    if (looks_like_json($inp)) {
      return $_last_out = jobj()->decode($inp);
    }
    els

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.