Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tm::materialized::jtm(3pm) [debian man page]

TM::Materialized::JTM(3pm)				User Contributed Perl Documentation				TM::Materialized::JTM(3pm)

NAME
TM::Materialized::JTM - Topic Maps, trait for JSON Topic Map instances. SYNOPSIS
use TM::Materialized::JTM; my $tm=TM::Materialized::JTM(file=>"somefile.jtm"); $tm->sync_in; ... # map was modified, now save the changes $tm->sync_out; DESCRIPTION
This package provides map parsing and creating functionality for JTM (JSON Topic Map) instances. The JSON Topic Map format is defined here: <http://www.cerny-online.com/jtm/1.0/>. INTERFACE
Methods Constructor $tm = TM::Materialized::JTM->new (...); The constructor expects a hash as described in TM::Materialized::Stream, with one additional key/value parameter: o format (choices: "json", "yaml") This option controls whether the JTM data is treated as being in JSON format or in YAML (which is a superset of JSON). This applies to both reading and writing of map data. The default value is "json". format $tm->format('json'); $curformat=$tm->format; This method gets or sets the format parameter for future operations. Possible choices: "json", "yaml". SEE ALSO
TM::Serializable::JTM AUTHOR INFORMATION
Copyright 2010, Alexander Zangerl, All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. http://www.perl.com/perl/misc/Artistic.html perl v5.10.1 2010-07-18 TM::Materialized::JTM(3pm)

Check Out this Related Man Page

TM::Serializable::JTM(3pm)				User Contributed Perl Documentation				TM::Serializable::JTM(3pm)

NAME
TM::Serializable::JTM - Topic Maps, trait for reading/writing JSON Topic Map instances. SYNOPSIS
# NOTE: this is not an end-user package, # see TM::Materialized::JTM for common application patterns # reading JSON/YAML: my $tm=TM->new(...); Class::Trait->apply($tm,"TM::Serializable::JTM"); $tm->deserialize($jsondata); # writing JSON/YAML: # ...a map $tm is instantiated somehow Class::Trait->apply($tm,"TM::Serializable::JTM"); my $yamltext=$tm->serialize(format=>"yaml"); DESCRIPTION
This trait provides functionality for reading and writing Topic Maps in JTM (JSON Topic Map) format, as defined here: <http://www.cerny-online.com/jtm/1.0/>. Limitations: o Variants are not supported by TM. o Reification of basenames, occurrences and roles is not supported by TM. o Multiple scopes are not supported by TM. INTERFACE
Methods deserialize This method take a string and parses JTM content from it. It will raise an exception on any parsing error. On success, it will return the map object. The method understands one key/value parameter pair: o format (choices: "json", "yaml") This option controls whether the JTM is expected to be in JSON format or in YAML (which is a superset of JSON). If no format parameter is given but the TM::Materialized::JTM trait is used, then the format is inherited from there; otherwise the default is "json". serialize This method serializes the map object in JTM notation and returns the result as a string. The method understands one key/value parameter pair: o format (choices: "json", "yaml") This option controls whether the JTM result should be created in the JSON format or in YAML (which is a superset of JSON). If no format parameter is given but the TM::Materialized::JTM trait is used, then the format is inherited from there; otherwise the default is "json". SEE ALSO
TM, TM::Serializable AUTHOR INFORMATION
Copyright 2010, Alexander Zangerl, All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. http://www.perl.com/perl/misc/Artistic.html perl v5.10.1 2010-07-18 TM::Serializable::JTM(3pm)
Man Page