srchulo / json-slurper Goto Github PK
View Code? Open in Web Editor NEWConvenient slurping and spurting of data via JSON
License: Other
Convenient slurping and spurting of data via JSON
License: Other
As pointed out by @Grinnz in #3, keeping track of the -auto_ext
flag by using the caller
can cause issues. Instead we should use Exporter::Shiny as detailed in #3.
use constant JSON_XS => $ENV{JSON_SLURPER_NO_JSON_XS} ? do { require JSON::PP; undef }
: eval { require Cpanel::JSON::XS; Cpanel::JSON::XS->VERSION('4.09'); 1 } ? 1
: do { require JSON::PP; undef };
The constant is "JSON_XS", but that module isn't checked. Perhaps JSON::MaybeXS, which uses Cpanel::JSON::XS, with fallbacks to JSON::XS then JSON::PP, should be used instead.
Something like this?
use JSON::PP;
use JSON::Slurper -backend => JSON::PP->new->pretty(1), qw(json_spurt);
Pretty much the same bug as https://rt.cpan.org/Public/Bug/Display.html?id=125486 on File::JSON::Slurper. UTF-8 decoding and encoding should only be done by the json encoder or the file slurper, not both.
What if I actually want to read a file called "ref", not "ref.json"? It seems I simply cannot do this with JSON::Slurper.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.