From ea1d54b31d0664a412dab9d1d7c2e4d721599eca Mon Sep 17 00:00:00 2001 From: Dave Longley Date: Tue, 8 Jul 2014 12:51:12 -0400 Subject: [PATCH] Fix examples. - Addresses #2. --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7f062ee..f7d227a 100644 --- a/README.md +++ b/README.md @@ -36,13 +36,15 @@ compatible, and require a very small memory footprint in order to operate. ```php $doc = (object)array( "http://schema.org/name" => "Manu Sporny", - "http://schema.org/url" => {"@id": "http://manu.sporny.org/"}, - "http://schema.org/image" => {"@id": "http://manu.sporny.org/images/manu.png"}); + "http://schema.org/url" => (object)array("@id" => "http://manu.sporny.org/"), + "http://schema.org/image" => (object)array("@id" => "http://manu.sporny.org/images/manu.png") +); $context = (object)array( "name" => "http://schema.org/name", - "homepage" => {"@id": "http://schema.org/url", "@type": "@id"}, - "image" => {"@id": "http://schema.org/image", "@type": "@id"}); + "homepage" => (object)array("@id" => "http://schema.org/url", "@type" => "@id"), + "image" => (object)array("@id" => "http://schema.org/image", "@type" => "@id") +); // compact a document according to a particular context // see: http://json-ld.org/spec/latest/json-ld/#compacted-document-form