Steven Haryanto > Perinci-CmdLine-0.84 > strip-result-env-json

Download:
Perinci-CmdLine-0.84.tar.gz

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

strip-result-env-json - Strip result envelope (JSON version)

VERSION ^

version 0.84

SYNOPSIS ^

 % cmdline-script ... --format=json | strip-result-env-json

DESCRIPTION ^

This is a simple utility to strip result envelope (that is, the status and message). It will change:

 [200,"OK",{"foo":"bar"}]
 [405,"Not found"]
 [200,"OK","result",{"result_metadata1":"val"}]

to:

 {"foo":"bar"}
 null
 "result"

It accepts and outputs JSON. It passes data unchanged if input data is not enveloped result. It dies on error.

SEE ALSO ^

Perinci::CmdLine

AUTHOR ^

Steven Haryanto <stevenharyanto@gmail.com>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2013 by Steven Haryanto.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: