Nephia::Plugin::JSON - A plugin for Nephia that provides JSON Response DSL
use Nephia plugins => ['JSON']; app { json_res +{ name => 'ytnobody', birth => '1980-11-11', }; };
Nephia::Plugin::JSON provides three DSL that is about JSON.
If you define it as true, json_res returns with 'X-API-Status' header.
use Nephia plugins => ['JSON' => {enable_api_status_header => 1}]; ...
Returns a Nephia::Response that contains application/json contents.
Returns JSON string of encoded hashref.
Returns hashref of decoded JSON.
Copyright (C) ytnobody.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
ytnobody <ytnobody@gmail.com>
To install Nephia::Plugin::JSON, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Nephia::Plugin::JSON
CPAN shell
perl -MCPAN -e shell install Nephia::Plugin::JSON
For more information on module installation, please visit the detailed CPAN module installation guide.