(retrieved on 2016-11-06). Visit the URL for the full contents.",
entries => [{ module => "JSON::Path" }],
summary => "Modules mentioned in Perl Advent Calendar 2015 (day 13)",
};
1;
# A
d on 2016-11-06). Visit the URL for the full contents.
=head1 INCLUDED MODULES
=over
=item * L<JSON::Path>
=back
=head1 HOMEPAGE
Please visit the project's homepage at L<https://metacpan.org/rel
{ module => "IO::All" },
{ module => "JSONY" },
{ module => "Moo" },
{ module => "JSON::Path" },
{ module => "File::Serializ
:Station>
=item * L<DBI>
=item * L<DBIx::Class>
=item * L<IO::All>
=item * L<JSONY>
=item * L<Moo>
=item * L<JSON::Path>
=item * L<File::Serialize>
=item * L<Moose>
=item * L<Stepford>
=item
itSubroutinePrototypes)
use warnings;
use 5.010001;
our $VERSION = '0.38';
use Carp;
use JSON qw(decode_json);
use Scalar::Util qw(blessed reftype);
use Pandoc::Walker qw(walk);
use Pandoc::Version;
EXPORT = (
keys %ELEMENTS,
qw(Document attributes metadata citation pandoc_version pandoc_json pandoc_query)
);
our @EXPORT_OK = ( @EXPORT, 'element' );
# create constructor functions
foreach
from_json;
my $arg = do {
if ( @_ == 1 ) {
$from_json = 1;
my $reftype = reftype $_[0] // '';
if ( $reftype eq 'ARRAY') {
# old JSON for
uments
=head1 SYNOPSIS
use Pandoc::Walker;
use Pandoc::Elements qw(pandoc_json);
my $ast = pandoc_json(<>);
# extract all links and image URLs
my $links = query $ast, 'Link|Ima
se;
our $VERSION = '0.13';
$VERSION = eval $VERSION;
use Mojo::Collection 'c';
use Mojo::JSON qw/encode_json/;
use Mojo::URL;
use Crypt::OpenSSL::PKCS10;
use MIME::Base64 qw/encode_base64url encode
x) = @_;
my $err;
if (my $res = $tx->success) {
$self->challenges->{$token} = $res->json;
} else {
$err = $tx->error;
$err->{token} = $token;
}
$self->$cb($err);
l, $req);
_die_if_error($tx, 'Error requesting challenges', 201);
my $challenges = $tx->res->json('/challenges') || [];
die "No http challenge available\n"
unless my $challenge = c(@$challe
er::UUEncode" },
{ module => "Data::Dumper" },
{ module => "JSON" },
{ module => "Storable" },
{ module => "XML::Simple" },
erializer::Abstract>
=item * L<Dancer::Serializer::UUEncode>
=item * L<Data::Dumper>
=item * L<JSON>
=item * L<Storable>
=item * L<XML::Simple>
=item * L<YAML>
=item * L<YAML::Tiny>
=back
=he
'Pandoc::Filter';
our @EXPORT_OK = (qw(find_filter apply_filter));
use Pandoc::Elements 'pandoc_json';
use Pandoc;
use IPC::Cmd 'can_run';
use IPC::Run3;
sub new {
bless { }, shift;
}
sub appl
$name\n");
}
sub apply_filter {
my ($doc, $format, @filter) = @_;
my $stdin = $doc->to_json;
my $stdout = "";
my $stderr = "";
run3 [@filter, $format // ''], \$stdin, \$stdout,
:',@filter)."\n$stderr";
}
my $transformed = eval { pandoc_json($stdout) };
die join(' ','filter emitted no valid JSON:',@filter)."\n" if $@;
# modify original document
$doc->meta($tr
ocument::VERSION;
use JSON ();
use Scalar::Util qw(reftype blessed);
use Pandoc::Walker ();
use subs qw(walk query transform); # Silence syntax warnings
sub to_json {
JSON->new->utf8->canonica
l->convert_blessed->encode( $_[0] );
}
sub TO_JSON {
# Run everything thru this method so arrays/hashes are cloned
# and objects without TO_JSON methods are stringified.
# Required to en
ed ) = @_;
if ( $maybe_blessed && blessed $ast ) {
return $ast if $ast->can('TO_JSON'); # JSON.pm will convert
# may have overloaded stringification! Should we check?
,
{ module => "Dancer::Serializer::Mutable" },
{ module => "JSON" },
{ module => "XML::Simple" },
{ module => "YAML" },
Action::REST>
=item * L<Dancer::Plugin::REST>
=item * L<Dancer::Serializer::Mutable>
=item * L<JSON>
=item * L<XML::Simple>
=item * L<YAML>
=back
=head1 HOMEPAGE
Please visit the project's hom
{ module => "HTTP::XSHeaders" },
{ module => "JSON" },
{ module => "JSON::MaybeXS" },
{ module => "Plack::Request" },
el::JSON::XS" },
{ module => "Crypt::URandom" },
{ module => "EV" },
{ module => "HTTP::Parser::XS" },
{ module => "JSON::XS
"Dancer2::Core::Role::SessionFactory::File" },
{ module => "Dancer2::Session::JSON" },
{ module => "Dancer2::Session::YAML" },
{ module => "Da
$self->statsite->increment('success.post.duplicate.count');
$c->render(status => 200, json => \@paths);
return
}
my $file = $c->req->content->asset;
my $content_sha =
$self->statsite->increment('success.post.write.count');
$c->render(status => 201, json => $paths);
}
catch {
if ($@->$_isa('failure::stor')) {
$self->statsi
.json.example:/etc/stor.conf -e CONFIG_FILE=/etc/stor.conf avastsoftware/stor:TAG
=head3 perl way (development)
#local install dependency
carton install
#run
CONFIG_FILE=config.json
Sep 22 06:05:03 2018 from module list in Acme::CPANLists::Import::JSONDecoders version 0.03.
package Acme::CPANModules::Import::JSONDecoders;
our $DATE = '2018-09-22'; # DATE
our $VERSION = '0.001'
d-of-json-decoders] (retrieved on 2016-07-19). For the full article, visit the URL.",
entries => [
{ module => "Benchmark" },
{ module => "Cpanel::JSON::XS"
{ module => "JSON" },
{ module => "JSON::MaybeXS" },
{ module => "JSON::PP" },
{ module => "JSON::XS" },
{
#include <vector>
#include "rocksdb/slice.h"
// We use JSONDocument for DocumentDB API
// Implementation inspired by folly::dynamic, rapidjson and fbson
namespace fbson {
class FbsonValue;
clas
// NOTE: none of this is thread-safe
class JSONDocument {
public:
// return nullptr on parse failure
static JSONDocument* ParseJSON(const char* json);
enum Type {
kNull,
kArray,
/* implicit */ JSONDocument(); // null
/* implicit */ JSONDocument(bool b);
/* implicit */ JSONDocument(double d);
/* implicit */ JSONDocument(int8_t i);
/* implicit */ JSONDocument(int16_t
o>
#include "rocksdb/env.h"
#include "util/log_buffer.h"
namespace rocksdb {
class JSONWriter {
public:
JSONWriter() : state_(kExpectKey), first_element_(true), in_array_(false) {
stream_ <<
tream_.str(); }
JSONWriter& operator<<(const char* val) {
if (state_ == kExpectKey) {
AddKey(val);
} else {
AddValue(val);
}
return *this;
}
JSONWriter& operator<<(
}
template <typename T>
JSONWriter& operator<<(const T& val) {
assert(state_ != kExpectKey);
AddValue(val);
return *this;
}
private:
enum JSONWriterState {
kExpectKey,
engine for Dancer2 by serializing the session,
and storing it in a database via L<DBIx::Class>.
JSON was chosen as the default serialization format, as it is fast, terse,
and portable.
=head1 SYNOP
olumn: "my_session_data" # defaults to session_data
serializer: "YAML" # defaults to JSON
Or if you are already using L<Dancer2::Plugin::DBIC> and want to use its
existing configuration
Serializer to use, defaults to JSON.
L<Dancer2::Session::DBIC> provides the following serializer classes:
=over
=item JSON - L<Dancer2::Session::DBIC::Serializer::JSON>
=item Sereal - L<Dancer2::S
ext::BEM::Instance;
use Template;
use File::ShareDir qw/module_dir dist_dir/;
use Path::Tiny;
use JSON::XS;
our $VERSION = version->new('0.1.1');
extends 'Data::Context';
has '+action_class' => (
}
sub json {
my ($self, $block) = @_;
my $json = eval { JSON::XS->new->utf8->relaxed->shrink->encode($block); };
if ($@) {
$json = qq/{error:"$@"}/;
}
return $json;
}
su
e log file
=head3 C<class ($block)>
Returns the classes for a block.
=head3 C<json ($block)>
Returns the block JSON encoded
=head1 DIAGNOSTICS
=head1 CONFIGURATION AND ENVIRONMENT
=head1 DEPEND
tring>
#include <vector>
#include "rocksdb/utilities/stackable_db.h"
#include "rocksdb/utilities/json_document.h"
#include "rocksdb/db.h"
namespace rocksdb {
// IMPORTANT: DocumentDB is a work in p
p of RocksDB that provides a very simple JSON API.
// When creating a DB, you specify a list of indexes you want to keep on your
// data. You can insert a JSON document to the DB, which is automatical
d and is an unique primary key. All other indexes are
// non-unique.
// NOTE: field names in the JSON are NOT allowed to start with '$' or
// contain '.'. We don't currently enforce that rule, but wi
/*
* FbsonToJson converts an FbsonValue object to a JSON string.
*/
class FbsonToJson {
public:
FbsonToJson() : os_(buffer_, OUT_BUF_SIZE) {}
// get json string
const char* json(const FbsonV
0);
if (pval) {
intern_json(pval);
}
os_.put(0);
return os_.getBuffer();
}
private:
// recursively convert FbsonValue
void intern_json(const FbsonValue* val) {
swit
}
case FbsonType::T_Object: {
object_to_json((ObjectVal*)val);
break;
}
case FbsonType::T_Array: {
array_to_json((ArrayVal*)val);
break;
}
default:
* This file defines FbsonJsonParserT (template) and FbsonJsonParser.
*
* FbsonJsonParserT is a template class which implements a JSON parser.
* FbsonJsonParserT parses JSON text, and serialize it t
o FBSON binary format
* by using FbsonWriterT object. By default, FbsonJsonParserT creates a new
* FbsonWriterT object with an output stream object. However, you can also
* pass in your FbsonWrite
h).
*
* FbsonJsonParser specializes FbsonJsonParserT with FbsonOutStream type (see
* FbsonStream.h). So unless you want to provide own a different output stream
* type, use FbsonJsonParser object.
'JavaScript::Duktape::Bool' => 1,
'boolean' => 1,
'JSON::PP::Boolean' => 1,
'JSON::Tiny::_Bool' => 1,
'Data::MessagePack::Boolean' => 1
};
BEGIN
'JavaScript::Duktape::Bool';
}
sub true { $true }
sub false { $false }
sub TO_JSON { ${$_[0]} ? \1 : \0 }
}
package JavaScript::Duktape::NULL;
{
use warnings;
use strict;