Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

How to add TO_JSON base method for DBIC Result in Catalyst

by Solo (Deacon)
on Aug 20, 2011 at 15:16 UTC ( #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? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2021-09-19 04:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?