Skip to content

Commit f7cee49

Browse files
committed
Update README
1 parent 00b56c4 commit f7cee49

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ Usage
1414
use JsonBrowser\JsonBrowser;
1515

1616
// returns a new JsonBrowser, or throws an exception if the JSON syntax is invalid
17-
$browser = new JsonBrowser($json);
17+
$browser = new JsonBrowser();
18+
19+
// load document as JSON string
20+
$browser->loadJSON($json);
21+
22+
// attach to existing document
23+
$browser->attach($document);
1824

1925
// check for child node
2026
$childExists = $browser->childExists('childName');

0 commit comments

Comments
 (0)