Skip to content

Commit 1abb809

Browse files
committed
Show how to specify URDNA2015 algorithm.
1 parent b16d43a commit 1abb809

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,12 @@ $flattened = jsonld_flatten($doc);
9494
$framed = jsonld_frame($doc, $frame);
9595
// document transformed into a particular tree structure per the given frame
9696

97-
// normalize a document
98-
$normalized = jsonld_normalize($doc, array('format' => 'application/nquads'));
97+
// normalize a document using the RDF Dataset Normalization Algorithm
98+
// (URDNA2015), see: http://json-ld.github.io/normalization/spec/
99+
$normalized = jsonld_normalize(
100+
$doc, array('algorithm' => 'URDNA2015', 'format' => 'application/nquads'));
99101
// normalized is a string that is a canonical representation of the document
100-
// that can be used for hashing
102+
// that can be used for hashing, comparison, etc.
101103

102104
// force HTTPS-only context loading:
103105
// use built-in secure document loader

0 commit comments

Comments
 (0)