Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

How to add TO_JSON base method for DBIC Result in Catalyst

by Solo (Deacon)
on Aug 20, 2011 at 15:16 UTC ( [id://921416]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package MyApp::Schema::DB::Result::Table;
    ...
    ...
    sub TO_JSON {
      return { $_[0]->get_inflated_columns };  
    }
    
  2. or download this
    package MyApp::View::JSON;
    
    ...
        my( $self, $c, $data ) = @_;
        $encoder->encode( $data );
    }
    
  3. or download this
    package MyApp::Schema::DB::Result::Base;
    
    ...
    ...
    extends 'MyApp::Schema::DB::Result::Base';
    ...
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://921416]
Approved by kcott
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-24 00:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found