
Badger::Codec::JSON - encode/decode data using JSON

use Badger::Codec::JSON;
my $codec = Badger::Codec::JSON->new();
my $encoded = $codec->encode({ msg => "Hello World" });
my $decoded = $codec->decode($encoded);

This module implements a subclass of Badger::Codec which uses the JSON module to encode and decode data to and from JSON.

Encodes $data to JSON.
$encoded = Badger::Codec::JSON->encode($data);
Decodes $data from JSON.
$decoded = Badger::Codec::JSON->decode($encoded);
This method returns a reference to the real subroutine that's doing all the encoding work, i.e. the encode() subroutine in JSON.
This method returns a reference to the real subroutine that's doing all the decoding work, i.e. the decode() subroutine in JSON.

Andy Wardley <abw@wardley.org>

Copyright (C) 2005-2008 Andy Wardley. All rights reserved.
