Permalink
Browse files

added an example of json to array

  • Loading branch information...
1 parent de6e873 commit 4666de0a7a7841bcf7fccd37fe15f493299a8bf3 @sirrobert committed Aug 23, 2012
Showing with 7 additions and 4 deletions.
  1. +7 −4 README.md
View
@@ -91,17 +91,20 @@ they were Perl.
The following examples let you access JSON strings as if it were Perl:
```perl6
-
use Masquerade;
my $json = '{"foo": "bar"}';
+say ($json but AsIf::Perl)<foo>; # bar
+```
-my $value = ($json but AsIf::Perl)<foo>;
+```perl6
+use Masquerade;
-say $value; # bar
+my $json = '[12.4, "pickle"]';
+say ($json but AsIf::Perl)[1]; # pickle
```
-This is a read-only operation right now.
+These are read-only operations right now.

0 comments on commit 4666de0

Please sign in to comment.