Index: /trunk/bkmk
===================================================================
--- /trunk/bkmk	(revision 90)
+++ /trunk/bkmk	(revision 91)
@@ -34,5 +34,5 @@
         my $identifier = shift;
         my $bookmark = find_bookmark($identifier);
-        print $bookmark ? Dump($bookmark->TO_JSON) : "Not Found\n";
+        print $bookmark ? Dump($bookmark->to_hashref) : "Not Found\n";
     },
     
@@ -41,5 +41,5 @@
         my $title = defined $TITLE ? $TITLE : fetch_title($uri);
         my $bookmark = $bookmarks->add({ uri => $uri, title => $title, tags => \@tags });
-        print Dump($bookmark->TO_JSON);
+        print Dump($bookmark->to_hashref);
     },
 
@@ -51,5 +51,5 @@
         # TODO: list by tags, date, etc.
         # TODO: coordinate this commandline script with the CGI app
-        print Dump([ map { $_->TO_JSON } @{ $resources->results } ]);
+        print Dump([ map { $_->to_hashref } @{ $resources->results } ]);
     },
 
@@ -60,5 +60,5 @@
             $bookmark->tags(\@tags);
             $bookmarks->update($bookmark);
-            print Dump($bookmark->TO_JSON);
+            print Dump($bookmark->to_hashref);
         } else {
             die "Not found\n";
@@ -77,5 +77,5 @@
     dump => sub {
         my ($dump_file) = @_;
-        my $dump = [ map { $_->TO_JSON } @{ $bookmarks->search->results } ];
+        my $dump = [ map { $_->to_hashref } @{ $bookmarks->search->results } ];
         $dump_file ? YAML::DumpFile($dump_file, $dump) : print Dump($dump);
     },
Index: /trunk/lib/Bookmark.pm
===================================================================
--- /trunk/lib/Bookmark.pm	(revision 90)
+++ /trunk/lib/Bookmark.pm	(revision 91)
@@ -32,5 +32,5 @@
 }
 
-sub TO_JSON {
+sub to_hashref {
     my $self = shift;
     return {
Index: /trunk/lib/Bookmarks/Controller.pm
===================================================================
--- /trunk/lib/Bookmarks/Controller.pm	(revision 90)
+++ /trunk/lib/Bookmarks/Controller.pm	(revision 91)
@@ -143,5 +143,5 @@
         
         if ($format eq 'json') {
-            my $json = decode_utf8(JSON->new->utf8->convert_blessed->encode($bookmark));
+            my $json = decode_utf8(JSON->new->utf8->convert_blessed->encode($bookmark->to_hashref));
             return [200, ['Content-Type' => 'application/json; charset=UTF-8', 'Last-Modified' => $last_modified], [$json]];
         } else {
Index: /trunk/lib/Bookmarks/List.pm
===================================================================
--- /trunk/lib/Bookmarks/List.pm	(revision 90)
+++ /trunk/lib/Bookmarks/List.pm	(revision 91)
@@ -97,5 +97,5 @@
     my $json = decode_utf8(
         JSON->new->utf8->convert_blessed->encode({
-            bookmarks => $self->results,
+            bookmarks => [ map { $_->to_hashref } @{ $self->results } ],
         })
     );
