JSON::TypeInference - Inferencing JSON types from given Perl values
use JSON::TypeInference; my $data = [ { name => 'yuno' }, { name => 'miyako' }, { name => 'nazuna' }, { name => 'nori' }, ]; my $inferred_type = JSON::TypeInference->infer($data); # object[name:string]
JSON::TypeInference infers the type of JSON values from the given Perl values.
JSON::TypeInference
If some candidate types of the given Perl values are inferred, JSON::TypeInference reports the type of it as a union type that consists of all candidate types.
infer($dataset: ArrayRef[Any]); # => JSON::TypeInference::Type
To infer the type of JSON values from the given values.
Return value is a instance of JSON::TypeInference::Type that means the inferred JSON type.
JSON::TypeInference::Type
Copyright (C) aereal.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
aereal <aereal@aereal.org>
To install JSON::TypeInference, copy and paste the appropriate command in to your terminal.
cpanm
cpanm JSON::TypeInference
CPAN shell
perl -MCPAN -e shell install JSON::TypeInference
For more information on module installation, please visit the detailed CPAN module installation guide.