| 1 | package File::Serialize::Serializer::JSON5; | ||
| 2 | 7 | our $AUTHORITY = 'cpan:YANICK'; | |
| 3 | #ABSTRACT: JSON5 serializer for File::Serialize | ||
| 4 | 7 | $File::Serialize::Serializer::JSON5::VERSION = '1.5.0'; | |
| 5 | 7 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 7 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 7 | ▶ | use Module::Runtime qw/ use_module /; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 7 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 7 | extends 'File::Serialize::Serializer::JSON::MaybeXS'; | |
| 12 | |||
| 13 | 57 | ▶ | sub extensions { qw/ json5 / }; |
|
Subroutine
extensions: called CC=1 SCAR=0.0
Pod
documented
| |||
| 14 | |||
| 15 | sub required_modules { | ||
| 16 | 115 | ▶ | qw/ JSON5 JSON::MaybeXS / |
|
Subroutine
required_modules: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 17 | } | ||
| 18 | |||
| 19 | sub deserialize { | ||
| 20 | 2 | ▶ | my( $self, $data, $options ) = @_; |
|
Subroutine
deserialize: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 21 | 2 | use_module('JSON5'); | |
| 22 | 2 | return JSON5::decode_json5($data,$options); | |
| 23 | } | ||
| 24 | |||
| 25 | 7 | 1; | |
| 26 | |||
| 27 | __END__ | ||