NAME
RDF::Server::Formatter::JSON - Work with JSON documents
SYNOPSIS
package My::Server;
protocol 'HTTP';
interface 'REST';
semantic 'Atom';
format json => 'JSON';
DESCRIPTION
Formats documents as JSON for easy use by JavaScript programs. This formatter is currently for read-only operations and does not support submitting JSON to the server.
METHODS
All methods that return a document also return a mime type of application/json as the first element of a two-element array. The document is the second element.
- wants_rdf
-
Returns false. The JSON formatter works with perl data structures instead of RDF documents.
- resource
-
This will return the resource data encoded as JSON.
- to_rdf
-
This will accept JSON and return RDF. This method is not yet implemented. This method does not return a mime type.
- feed
-
Returns a JSON representation of a list of resources.
- category
-
Returns a JSON representation of a document following the semantics of an atom:category document.
- collection
-
Returns a JSON representation of a document following the semantics of an app:collection document: a list of categories.
- workspace
-
Returns a JSON representation of a document following the semantics of an app:workspace document: a list of collections.
- service
-
Returns a JSON representation of a document following the semantics of an app:service document: a list of workspaces.
AUTHOR
James Smith, <jsmith@cpan.org>
LICENSE
Copyright (c) 2008 Texas A&M University.
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.