3G2 r/w | DSS r | JPEG r/w | ODT r | RW2 r/w
3GP r/w | DV r | JSON r | OFR r | RWL r/w
7Z r | DVB r/w | JXL r/w | OGG r | RWZ
- Default ExifTool format
JSON - JSON format
JSONQ - JSON with quoted numerical values
Note that the JSONQ setting causes all values in the exiftool application
-json output to be quoted, regard
eoTiff, GIF, GIMP,
GM, GoPro, H264, HTML, ICC_Profile, ID3, IPTC, ISO, ITC, JFIF, JPEG,
Jpeg2000, JSON, JUMBF, Leaf, LNK, Lytro, M2TS, MakerNotes, Matroska, Meta,
MIE, MIFF, MISB, MNG, MOI, MPC, MPEG,
--------------------------------------
# File: Import.pm
#
# Description: Import CSV and JSON database files
#
# Revisions: 2011-03-05 - P. Harvey Created
#--------------------------------
_OK);
$VERSION = '1.14';
@ISA = qw(Exporter);
@EXPORT_OK = qw(ReadCSV ReadJSON);
sub ReadJSONObject($;$);
my %unescapeJSON = ( 't'=>"\t", 'n'=>"\n", 'r'=>"\r", 'b' => "\b", 'f' => "\f" );
my $chars
# Read JSON object from file
# Inputs: 0) RAF reference or undef, 1) optional scalar reference for data
# to read before reading from file (ie. the file read buffer)
# Returns: JSON object
ExifTool
extracts the full JSON metadata blocks, as well as breaking them down into
individual tags. All available tags are extracted from the JSON metadata,
even if they don
't appear in the table below.
},
JSONMetadata => {
Notes => 'the full JSON-format metadata blocks',
Binary => 1,
List => 1,
},
EmbeddedImage => {
Notes
--------------------------------------------------------------------
# Extract tags from a parsed JSON hash
# Inputs: 0) ExifTool ref, 1) tag hash ref, 2) base tag name
sub ExtractTags($$$)
{
my (
sh::FLV Real::Media Real::Audio
Real::Metafile Red RIFF AIFF ASF TNEF WTV DICOM FITS XISF MIE JSON HTML
XMP::SVG Palm Palm::MOBI Palm::EXTH Torrent EXE EXE::PEVersion EXE::PEString
EXE::De
DWF DWG DXF WTV Torrent VCard
LRI R3D AA PDB PFM2 MRC LIF JXL MOI ISO ALIAS PCAP JSON MP3
TNEF DICOM PCD NKA ICO TXT AAC);
# file types that we can write (edit)
my @w
PS => ['JPEG', 'JPEG Stereo image'],
JPX => ['JP2', 'JPEG 2000 with extensions'],
JSON => ['JSON', 'JavaScript Object Notation'],
JUMBF=> ['JUMBF','JPEG Universal Metadata Box Format'],
;$);
sub EscapeJSON($;$);
# lookups for JSON characters that we escape specially
my %jsonChar = ( '"'=>'"', '\\'=>'\\', "\b"=>'b', "\f"=>'f', "\n"=>'n', "\r"=>'r', "\t"=>'t' );
my %jsonEsc = ( '"'=>
s
foreach $key (Image::ExifTool::OrderedKeys($obj)) {
my $hdr = $sfmt ? EscapeJSON($key) . ':' : $key . '=';
push @vals, $hdr . SerializeStruct($et, $$obj{$key}, '}');
ing (closing bracket plus "," and "|")
if ($sfmt) {
$rtnVal = EscapeJSON($obj, $sfmt eq 'JSONQ');
} else {
my $pat = $ket ? "\\$ket|,|\\|" : ',|\\|';
json => {
Name => 'JSONData',
Flags => [ 'Binary', 'Protected', 'BlockExtract' ],
Notes => q{
by default, data in this tag is parsed using the ExifTool JSON mod
extracted as a block via the "JSONData" tag or by setting the API
BlockExtract option
},
SubDirectory => { TagTable => 'Image::ExifTool::JSON::Main' },
},
cbor =>
/;
return join '-', @a;
},
# seen:
# cacb/cast/caas/cacl/casg/json-00110010800000aa00389b71
# (also brob- but not yet tested)
# 6579d6fbdba2446bb2
member, $iWorkType);
# special files to extract
my %extract = (
'meta.json' => 1,
'previews/preview.png' => 'PreviewPNG',
'preview.jpg' => 'PreviewI
$status and $et->Warn("Error extracting $file"), next;
if ($file eq 'meta.json') {
$et->ExtractInfo(\$buff, { ReEntry => 1 });
if ($$et{
mai::Time;
use parent 'Time::Piece';
use v5.26;
use strict;
use warnings;
sub TO_JSON {
# Instance method for JSON::encode()
# @return [Integer] Machine time
my $self = shift;
retur
tured_data {
my ($self, $html) = @_;
my @jsonld = ($html =~ /<script\b[^>]*type=["']application\/ld\+json["'][^>]*>(.*?)<\/script>/gis);
if(scalar(@jsonld)) {
return {
name => 'Structured Da
otes => scalar(@jsonld) . ' JSON-LD block(s) found'
};
}
return {
name => 'Structured Data',
status => 'warn',
notes => 'no structured data found',
resolution => 'Add JSON-LD structured d
ata to <head>: <script type="application/ld+json">{"@context": "https://schema.org", "@type": "WebPage", "name": "Page Title", "description": "Page description"}</script> - helps search engines unders
pecific headers in the bounce mail headers such as C<X-Failed-Recipients:>, which MTA modules
for JSON structure.
=head1 CLASS METHODS
=head2 C<B<another()>>
C<another()> method returns another lis
nings;
use autodie qw(:all);
use JSON::MaybeXS;
use File::Glob ':glob';
use File::Slurp;
use POSIX qw(strftime);
use File::stat;
my $cover_db = 'cover_db/cover.json';
my $output = 'cover_html/index.
html';
# Read and decode coverage data
my $json_text = read_file($cover_db);
my $data = decode_json($json_text);
my $coverage_pct = 0;
my $badge_color = 'red';
if(my $total_info = $data->{summary}{
} bsd_glob("coverage_history/*.json");
my $prev_data;
if (@history >= 1) {
my $prev_file = $history[-1]; # Most recent before current
eval {
$prev_data = decode_json(read_file($prev_file));
};
}
] argv0 Path to mbox or Maildir/
# @param [Hash] argv0 or Hash (decoded JSON)
# @param [Handle] argv0 or STDIN
# @param [Hash] argv1 Opt
code mailbox/Maildir and dump as JSON
# @param [String] argv0 Path to mbox or Maildir/
# @param [Hash] argv0 or Hash (decoded JSON)
# @param [Handle]
Code reference to a callback method
# @return [String] Decoded data as JSON text
my $class = shift;
my $argv0 = shift // return undef; die ' ***error: wrong number o
::Mechanize::Chrome::DOMops qw/
domops_read_dom_element_selectors_from_JSON_string
domops_read_dom_element_selectors_from_JSON_file
/;
use WWW::Mechanize::Chrome::Webshot;
use Data::Roundtrip qw/pe
nts=s' => sub {
my $jsonstr = $_[1];
$constructor_params->{$_[0]} = WWW::Mechanize::Chrome::DOMops::domops_read_dom_element_selectors_from_JSON_string($jsonstr);
die "$jsonstr\n\n$0 : error, fai
led to parse above input JSON via --".$_[0] unless defined $constructor_params->{$_[0]};
},
'remove-dom-elements-file=s' => sub {
my $jsonfile = $_[1];
$constructor_params->{'remove-dom-elements
qw( clone );
use Syntax::Keyword::Try;
use Net::Cisco::FMC::v1::Role::ObjectMethods;
use JSON qw( decode_json );
# use Data::Dumper::Concise;
no warnings "experimental::signatures";
has 'domains'
204) {
# the allowed domains are returned in the domains header JSON
# encoded
my $domains = decode_json($res->response->header('domains'));
#say Dumper($domains);
Supports resuming.
=head1 KNOWN BUGS
Older FMC versions have bugs like:
=over
=item truncated JSON responses
No workaround on client side possible, only a FMC update helps.
=item no response to
encode_sereal decode_sereal );
use CBOR::XS qw( encode_cbor decode_cbor );
use JSON::XS qw( encode_json decode_json );
use MCE::Step
max_workers => 8, # Default 'auto'
ch
#ifndef SIMDJSON_DECODE_H
#define SIMDJSON_DECODE_H
#ifdef __cplusplus
extern "C" {
#endif
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
// main JSON struct definition
// also used by mai
// {[]}-nesting level
unsigned char incr_mode;
SV *v_false, *v_true;
} JSON;
// structure used for decoding JSON
// also used by the main XS code
typedef struct
{
char *cur; // current pars
parse error, if != 0
JSON json;
U32 depth; // recursion depth
U32 maxdepth; // recursion depth limit
// fields needed for simdjson decoder
SV *input; // original JSON document, needed becau
ead Google Takeout JSON files
# 2024/04/23 - PH Added ability to read more OpenTracks GPS tags
# 2024/08/28 - PH Added support for new Google Takeout JSON format
#
4/11/05 - PH Added support for Google Maps "Export timeline data"
# JSON format
#
# References: 1) http://www.topografix.com/GPX/1/1/
# 2) http://www.gpsi
aceVisit|activitySegment|latitudeE7)"\s*:/) {
# Google Takeout JSON format
$format = 'JSON';
$sortFixes = 1; # (fixes are not all in order for this form
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include "ppport.h"
#include "simdjson_wrapper.h"
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <lim
e F_HOOK 0x00008000UL // some hooks exist, so slow-path processing
#define F_USE_SIMDJSON 0x00010000UL
#define F_CORE_BOOLS 0x00020000UL
#define F_ENCODE_CORE_BOOLS 0x00040000
HORT_STRING_LEN 16384 // special-case strings of up to this size
#define DECODE_WANTS_OCTETS(json) ((json)->flags & F_UTF8)
#define SB do {
#define SE } while (0)
#if __GNUC__ >= 3
# define my_expe
Info',
Description => 'PEg Info',
SubDirectory => { TagTable => 'Image::ExifTool::JSON::Main' },
},
# 0x0da1-name - seen 'Captured_App_Info' #forum16086
# 0xa050-name - seen
л перезапуска JPEG',
'JPEGTables' => 'JPEG-таблицы',
'JSONMetadata' => 'Метаданные JSON',
'JobID' => 'ID задания',
'JobTitle' => 'Должность',