| 1 | 5 | ▶ | use v5.26; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | 5 | ▶ | use Object::Pad; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | |||
| 4 | 5 | ▶ | use Getopt::Pad::Config::Format; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | class Getopt::Pad::Config::Format::Json :isa(Getopt::Pad::Config::Format) :strict(params) { | ||
| 7 | 5 | ▶ | use JSON::PP (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 5 | our $VERSION = '0.04'; | |
| 10 | |||
| 11 | 5 | ▶ | use constant NAMES => ['json']; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | |||
| 13 | 4 | ▶ | method parse($text) { |
|
Subroutine
parse: called CC=1 SCAR=0.0
Pod
documented
| |||
| 14 | 4 | return JSON::PP->new->decode($text); | |
| 15 | 5 | } | |
| 16 | |||
| 17 | 2 | ▶ | method dump($data) { |
|
Subroutine
dump: called CC=1 SCAR=0.0
Pod
documented
| |||
| 18 | 2 | return JSON::PP->new->pretty->canonical->encode($data); | |
| 19 | 5 | } | |
| 20 | } | ||
| 21 | |||
| 22 | 5 | 1; | |
| 23 | |||
| 24 | __END__ | ||