From: Karen Etheridge Date: Tue, 7 Oct 2014 16:36:27 +0000 (-0700) Subject: document JSON->true, JSON->false X-Git-Tag: v1.002003~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=32af371cd8fa01f2de68b8e1c23b2d432883f7bd;p=p5sagit%2FJSON-MaybeXS.git document JSON->true, JSON->false --- diff --git a/Changes b/Changes index 1777327..08d17ae 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,7 @@ Revision history for JSON-MaybeXS + - document how to use booleans + 1.002002 - 2014-04-23 - more metadata fiddling, to remove the Cpanel::JSON::XS dependency visible to static analyzers (the prequisites at install time remain unchanged) diff --git a/lib/JSON/MaybeXS.pm b/lib/JSON/MaybeXS.pm index 4279307..f646237 100644 --- a/lib/JSON/MaybeXS.pm +++ b/lib/JSON/MaybeXS.pm @@ -126,6 +126,14 @@ Since this is a trifle irritating and noticeably un-perlish, we also offer: which works equivalently to the above (and in the usual tradition will accept a hashref instead of a hash, should you so desire). +=head1 BOOLEANS + +To include JSON-aware booleans (C, C) in your data, just do: + + use JSON::MaybeXS; + my $true = JSON->true; + my $false = JSON->false; + =head1 AUTHOR mst - Matt S. Trout (cpan:MSTROUT)