Name
Object::Relation::Format::JSON - The Object::Relation JSON serialization class
Synopsis
use Object::Relation::Format::JSON;
my $formatter = Object::Relation::Format::JSON->new;
my $json = $formatter->serialize($obj_rel_object);
my $object = $formatter->deserialize($json);
Description
This class is used for serializing and deserializing Object::Relation objects to and from JSON. New objects may be created or existing objects may be updated using this class.
Constructors
new
my $xml = Object::Relation::Format::JSON->new;
Creates and returns a new JSON format object.
content_type
my $content_type = $formatter->content_type;
Returns the MIME content type for the current format.
ref_to_format
my $json = $formatter->ref_to_format($reference);
Converts an arbitrary reference to its JSON equivalent.
format_to_ref
my $reference = $formatter->format_to_ref($json);
Converts JSON to its equivalent Perl reference.
Copyright and License
Copyright (c) 2004-2006 Kineticode, Inc. <info@obj_relode.com>
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.