Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Framework for making Moose-compatible object from json

by kcott (Archbishop)
on Aug 20, 2022 at 22:11 UTC ( [id://11146273]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package Local::MooseJson;
    
    ...
    __PACKAGE__->meta->make_immutable;
    
    1;
    
  2. or download this
    #!/usr/bin/env perl
    
    ...
    my $mj = Local::MooseJson::->new($rest_json);
    
    print 'Username: ', $mj->icon()->{username}, "\n";
    
  3. or download this
    ken@titan ~/tmp/pm_11146255_moose_json/bin
    $ ./moose_json.pl
    ...
    IGNORED! Unknown JSON property: 'body_html'
    IGNORED! Unknown JSON property: 'datetime'
    Username: nataraj
    
  4. or download this
    ken@titan ~/tmp
    $ ls -lR pm_11146255_moose_json
    ...
    pm_11146255_moose_json/lib/Local:
    total 4
    -rw-r--r-- 1 ken None 788 Aug 21 07:40 MooseJson.pm
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11146273]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2024-04-19 12:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found