This repository has been archived by the owner on Jul 5, 2021. It is now read-only.
/
json-activity-2.xml
1194 lines (1035 loc) · 46.4 KB
/
json-activity-2.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type='text/xsl' href='./rfc2629.xslt' ?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2119 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
<!ENTITY rfc3987 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3987.xml'>
<!ENTITY rfc3986 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3986.xml'>
<!ENTITY rfc3339 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3339.xml'>
<!ENTITY rfc4627 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4627.xml'>
<!ENTITY rfc5988 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5988.xml'>
<!ENTITY rfc6963 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6963.xml'>
<!ENTITY rfc5646 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5646.xml'>
<!ENTITY jsonld PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml4/reference.W3C.WD-json-ld-20130411.xml'>
]>
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc private="Activity Streams Working Group"?>
<rfc>
<front>
<title abbrev="ActivityStreams">Draft: JSON Activity Streams 2.0</title>
<author fullname="James M Snell" initials="J.M." surname="Snell">
<organization>IBM</organization>
</author>
<!--
<author fullname="Martin Atkins" initials="M." surname="Atkins">
<organization>SAY Media</organization>
</author>
<author fullname="Will Norris" initials="W." surname="Norris">
<organization>Google</organization>
</author>
<author fullname="Chris Messina" initials="C." surname="Messina">
<organization>Citizen Agency, Google</organization>
</author>
<author fullname="Monica Wilkinson" initials="M." surname="Wilkinson">
<organization>MySpace, Facebook, VMware</organization>
</author>
<author fullname="Rob Dolin" initials="R." surname="Dolin">
<organization>Microsoft</organization>
</author>
-->
<date month="May" year="2013" />
<abstract>
<t>
This specification details a model for representing potential and
completed activities using the JSON format.
</t>
</abstract>
<note title="Author's Note">
<t>
This draft is heavily influenced by the original JSON
Activity Streams 1.0 specification that was originally co-authored
by Martin Atkins, Will Norris, Chris Messina, Monica Wilkinson,
Rob Dolin and James Snell. The author is very thankful for their
significant contributions and gladly stands on their shoulders.
</t>
</note>
</front>
<middle>
<section anchor="introduction" title="Introduction">
<t>
In the most basic sense, an "activity" is a semantic description
of either a potential or completed action. In the former case,
activities express what can be done with any particular object,
while in the latter case, they express what has already been
done.
</t>
<t>
It is the goal of this specification to provide a JSON-based syntax
that is sufficient to express metadata about activities in a rich,
human-friendly, machine-processable and extensible manner. This may
include constructing natural-language descriptions about the activity,
visual representations about he activity, associating actionable
information with various types of objects, communicating or recording
activity logs, or delegation of potential actions to other applications.
</t>
<t>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in
<xref target="RFC2119" />.
</t>
<section title="Relationship to JSON Activity Streams 1.0" anchor="asms-1">
<t>
The JSON Activity Streams 1.0 specification was published in May
of 2011 and provided a baseline extensible syntax for the expression
of completed activities. This specification builds upon that
initial foundation by incorporating lessons learned through
extensive implementation, community feedback and related work
being performed in other standards development communities.
</t>
<t>
While the syntax defined by this specification diverges somewhat
from that defined by JSON Activity Streams 1.0, the verbs, objectTypes,
extensions and fundamental model defined by that original
specification remain intact.
</t>
</section>
<section title="Relationship to JSON-LD 1.0" anchor="json-ld" >
<t>
The <xref target="W3C.WD-json-ld-20130411">JSON-based Serialization for
Linked Data (JSON-LD)</xref> describes a rich syntax for the
serialization of semantically-rich metadata using the JSON format.
While the updated Activity Streams representation provided by this
document is not defined as a "JSON-LD Vocabulary", the syntax is
designed to be closely compatible with JSON-LD such that
implementations can utilize both with minimal conflict or confusion.
</t>
<t>
Most significantly, the JSON Activity Streams 2.0 syntax
directly leverages the "@id", "@type", and "@language" properties
defined by JSON-LD.
</t>
<t>
There are a few differences between JSON-LD and the
serialization syntax described here, specifically:
<list style="symbols">
<t>
While JSON-LD allows using relative IRI references
in the values of @id properties, this specification
limits @id properties to absolute IRIs.
</t>
<t>
While it is possible to derive a JSON-LD "context" description
for the Activity Streams 2.0 JSON syntax one is not normatively
provided.
</t>
</list>
</t>
</section>
<section anchor="serialization" title="Syntax Conventions">
<t>
This specification defines a <xref target="RFC4627">JSON-based</xref>
serialization syntax.
</t>
<t>
When serialized, absent properties are represented either
by setting the property value to null or by omitting the
property declaration altogether at the option of the publisher;
these representations are semantically equivalent. If a
property has an array value, the absence of any items in that array
MUST be represented by omitting the property entirely or by setting
the value to null.
</t>
<t>
This specification uses IRIs <xref target="RFC3987"/>.
Every URI <xref target="RFC3986" /> is also an IRI, so a URI may be used
wherever below an IRI is named. There are two special considerations:
(1) when an IRI that is not also a URI is given for dereferencing, it
MUST be mapped to a URI using the steps in Section 3.1 of
<xref target="RFC3987"/> and (2) when an IRI is serving as
an "@id" value, it MUST NOT be so mapped.
</t>
<t>
Unless otherwise specified, all properties with date and
time values MUST conform to the "date-time" production in
<xref target="RFC3339" />, with an uppercase "T" character
used to separate date and time, and an uppercase "Z" character
in the absence of a numeric time zone offset. All such timestamps
SHOULD be represented relative to Coordinated Universal Time (UTC).
</t>
</section>
</section>
<section anchor="examples" title="Example Activities">
<t>Following is a simple example of an activity:</t>
<figure><artwork><![CDATA[
{
"@type": "post",
"published": "2011-02-10T15:04:55Z",
"actor": {
"@type": "person",
"@id": "urn:example:person:martin",
"name": "Martin Smith",
"url": "http://example.org/martin",
"image": {
"@id": "http://example.org/martin/image",
"width": 250,
"height": 250
}
},
"object" : {
"@id": "urn:example:blog:abc123/xyz"
"url": "http://example.org/blog/2011/02/entry"
},
"target" : {
"@type": "blog",
"@id": "urn:example:blog:abc123",
"name": "Martin's Blog",
"url": "http://example.org/blog/"
}
}
]]></artwork></figure>
<t>
A more extensive, single-entry "Activity Stream"
follows. In addition to containing a number of required and optional
core properties, the example contains the additional, undefined extension
properties "foo" and "foo2" for illustrative purposes only.
</t>
<figure><artwork><![CDATA[
{
"items" : [
{
"@type": "post",
"@language": "en",
"published": "2011-02-10T15:04:55Z",
"foo": "some extension property",
"generator": "http://example.org/activities-app",
"provider": "http://example.org/activity-stream",
"title": {
"en": "Martin posted a new video to his album.",
"ga": "Martin phost le físeán nua a albam."
},
"actor": {
"@type": "person",
"@id": "urn:example:person:martin",
"name": "Martin Smith",
"url": "http://example.org/martin",
"foo2": "some other extension property",
"image": {
"@id": "http://example.org/martin/image",
"width": 250,
"height": 250
}
},
"object" : {
"@type": "photo",
"@id": "urn:example:album:abc123/my_fluffy_cat",
"url": "http://example.org/album/my_fluffy_cat.jpg",
"image": {
"@id": "http://example.org/album/my_fluffy_cat_thumb.jpg",
"width": 250,
"height": 250
}
},
"target": {
"url": "http://example.org/album/",
"@type": "photo-album",
"@id": "urn:example.org:album:abc123",
"title": {
"en": "Martin's Photo Album",
"ga": "Grianghraif Máirtín"
},
"image": {
"@id": "http://example.org/album/thumbnail.jpg",
"width": 250,
"height": 250
}
}
}
]
}
]]></artwork></figure>
</section>
<section anchor="model" title="Object Model">
<section anchor="object" title="Object">
<t>
The following "core properties" apply to all JSON objects serialized
within an Activity Stream document.
</t>
<texttable>
<ttcol align="left" width="15%">Property</ttcol>
<ttcol align="left" width="21%">Value</ttcol>
<ttcol align="left">Description</ttcol>
<c>@id</c>
<c>IRI</c>
<c>
Provides a permanent, universally unique identifier for the
object in the form of an absolute IRI <xref target="RFC3987"/>.
Objects SHOULD contain a single "@id" property. If an object
does not contain an "id" property, consumers MAY use the value of
the "url" property as a less-reliable, non-unique identifier.
</c>
<c>@type</c>
<c>IRI</c>
<c>
Identifies the type of object. An object MAY contain a "@type"
property whose value matches either the "isegment-nz-nc" or the
"IRI" production in <xref target="RFC3987"/>. The use of a relative
reference other than a simple name is not allowed. If no "@type"
property is specified, the object has no specific type.
</c>
<c>@language</c>
<c><xref target="RFC5646"/> Language Tag</c>
<c>
Identifies the language for all human-readable, natural-language
metadata values included in the object. An object MAY contain a
"@language" property.
</c>
<c>name</c>
<c>String</c>
<c>
A simple human-readable, plain-text name for the
object. HTML markup MUST NOT be included. An object MAY contain a
"name" property. If the object does not specify a "@type"
property, the object SHOULD specify a "name".
</c>
<c>url</c>
<c>Link</c>
<c>
A <xref target="link">Link</xref> value describing a resource
that provides a visual representation of the object. An object
MAY contain a "url" property.
</c>
</texttable>
</section>
<section anchor="lang" title="Natural Language Values">
<t>
Natural Language values represent human-readable character
sequences in one or more languages. They are expressed as
either: (1) a single JSON string or (2) a JSON dictionary
mapping <xref target="RFC5646" /> Language tags to localized,
equivalent translations of the same string value.
</t>
<t>
For instance, the "title" property in all objects is a
Natural Language value. This means that the "name" can
be expressed in one or more languages:
</t>
<figure>
<preamble>A single String value using the default language:</preamble>
<artwork>
{
"@language": "en",
"title": "This is the title"
}
</artwork>
</figure>
<figure>
<preamble>Multiple, language-specific values:</preamble>
<artwork>
{
"title": {
"en": "This is the name",
"fr": "C'est le titre",
"sp": "Este es el título"
}
}
</artwork>
</figure>
<t>
Each key in the JSON dictionary MUST be an <xref target="RFC5646" />
Language Tag. The associated values MUST be Strings.
</t>
</section>
<section anchor="link" title="Link Values">
<t>
Link values represent references to other objects and resources.
They are expressed as either: (1) a String containing an
absolute or relative IRI, (2) an <xref target="object">Object</xref>,
or (3) a JSON Array containing a mixture of IRIs or
<xref target="object">Objects</xref>. Link values are closely related
to the conceptual model of Links as established in
<xref target="RFC5988"/>, but have a serialization that is
compatible with the JSON-serialization for Linked Data.
</t>
<t>
For instance, as defined in previously, all
<xref target="object">objects</xref> can contain an
"image" property whose value describes a graphical
representation of the containing object. This property
will typically be used to provide the URL to a JPEG,
GIF or PNG type resource that can be displayed to
the user. Any given object might have multiple such visual
representations -- multiple screenshots, for instance, or
the same image at different resolutions. Based on the
JSON-LD approach, there are essentially three ways of
describing these references.
</t>
<figure><preamble>To reference a single image without any
additional metadata, the link value can be expressed as
a simple JSON string containing an absolute or relative
IRI:</preamble><artwork>
{
"@type": "application",
"@id": "http://example.org/application/123",
"name": "My Application",
"image": "http://example.org/application/123.png"
}
</artwork></figure>
<figure><preamble>Alternatively, if additional metadata is required,
the link can be expressed as an object that uses the @id or url
property:</preamble>
<artwork>
{
"@type": "application",
"@id": "http://example.org/application/123",
"name": "My Application",
"image": {
"@id": "http://example.org/application/123.png",
"mediaType": "image/png",
"height": 320,
"width": 320
}
}
</artwork>
</figure>
<figure><preamble>If more than one link value is to be expressed,
A JSON Array with a mix of string and object elements can be
used:</preamble><artwork>
{
"@type": "application",
"@id": "http://example.org/application/123",
"name": "My Application",
"image": [
"http://example.org/application/abc.gif",
{
"@id": "http://example.org/application/123.png",
"mediaType": "image/png",
"height": 320,
"width": 320
}
]
}
</artwork></figure>
<t>
Individual items contained in such an array value are independent
of the others and no significance is given to the order of
items in the array.
</t>
<t>
RFC 5988 defines that all Links have a "link relation"
that describes the contextual purpose of the link. Within
an Activity Streams document, in the absence of a specific
"rel" property within the link itself, the name of the property
whose value is a link serves as the "link relation". Any legal
link relation value, as defined by RFC 5988, can be used as a
property with a link value in any Activity Streams object, except
where the link relation might conflict with any other property
defined by this specification.
</t>
<t>
When an <xref target="object">object</xref> is used to represent
a Link value, the following additional properties MAY be used:
</t>
<texttable>
<ttcol align="left" width="15%">Property</ttcol>
<ttcol align="left" width="21%">Value</ttcol>
<ttcol align="left">Description</ttcol>
<c>"rel"</c>
<c>RFC 5988 Link Relation</c>
<c>
The RFC 5988 Link Relation associated with this link value.
If absent, the name of the property is assumed to specify
the link relation.
</c>
<c>"mediaType"</c>
<c>MIME Media Type</c>
<c>
The MIME media type of the resource being referenced.
</c>
</texttable>
</section>
<section anchor="activity" title="Activity">
<t>
Activity objects are specializations of the base
<xref target="object">Object</xref> type that provide
metadata about potential or completed actions.
</t>
<t>
Within an Activity object, the "@type" property is used
to identify the type of activity. Formerly, in JSON Activity
Streams version 1.0, this was represented using the "verb"
property. All existing verb definitions used in JSON Activity
Streams 1.0 implementations can continue to be used as values
of the "@type" property and retain their existing semantics.
</t>
<t>
Activity objects extend the core <xref target="object">object</xref>
definition with the following additional, optional properties:
</t>
<texttable>
<ttcol align="left" width="15%">Property</ttcol>
<ttcol align="left" width="21%">Value</ttcol>
<ttcol align="left">Description</ttcol>
<c>"actor"</c>
<c><xref target="link">Link</xref> value</c>
<c>
Describes the entity that either peformed or is expected to
perform the Activity.
</c>
<c>"object"</c>
<c><xref target="link">Link</xref> value</c>
<c>
Describes the primary object of the activity. For instance,
in the activity, "John saved a movie to his wishlist", the object
of the activity is "movie". An activity SHOULD contain an
"object" property. If the "object" property is not contained, the
primary object of the activity MAY be implied by context.
</c>
<c>"target"</c>
<c><xref target="link">Link</xref> value</c>
<c>
Describes the target of the activity. The precise meaning of the
activity's target is dependent on the activities "verb",
but will often be the object the English preposition "to".
For instance, in the activity, "John saved a movie to his
wishlist", the target of the activity is "wishlist". The activity
target MUST NOT be used to identity an indirect object that is
not a target of the activity.
</c>
<c>"result"</c>
<c><xref target="link">Link</xref> value</c>
<c>
Describes the result of the activity. For instance, if a particular
action results in the creation of a new resource, the "result"
property can be used to describe that new resource.
</c>
<c>"context"</c>
<c><xref target="link">Link</xref> value</c>
<c>
The "context" property allows the Activity to further include
information about why a particular action occurred by providing
details about the context within which a particular action was
performed. The value of the context property is
<xref target="link">Link</xref> value.
</c>
<c>"status"</c>
<c>String</c>
<c>
A string value indicating the current status of the activity.
The value MUST be one of: "tentative", "pending", "completed",
or "canceled".
</c>
<c>"priority"</c>
<c>Decimal Number between 0.00 and 1.00</c>
<c>
An indicator of the relative priority or importance that
the creator of an Activity object considers the object to
have. Represented as a numeric decimal between 0.00 and 1.00,
with two decimal places of precision. If the property is
omitted, or expicitly set to null, the assumption is that
no explicit priority or importance can be assumed. All other
values falling between 0.00 and 1.00 indicate increasing
priority.
</c>
</texttable>
<section title="Considerations on the use of "priority"">
<t>
The presence of the "priority" property does not impose any
specific processing or display requirements on the part of any
entity consuming the activity.
</t>
<t>
Expressing the value as a range of numeric decimal values is intended
to provide the greatest level of flexibility in the expression and
consumption of prioritization detail. It is expected that
implementors consuming activity objects containing "priority" will
utilize and expose the additional information in a number of
different ways depending on the unique requirements of each
application use case.
</t>
<t>
Many existing systems do not typically represent priority values as
numeric ranges. Such systems typically use fixed, labeled brackets
such as "low", "normal" and "high" or "urgent". Similar mechanisms
can be established, by convention, when using the "priority"
property. In typical use, it is RECOMMENDED that implementations
wishing to work with such defined categories treat "priority"
property values in the range 0.00 to 0.25 as "low" priority; values
greater than 0.25 to 0.75 as "normal" priority; and values greater
than 0.75 to 1.00 as "high" priority. Specific implementations are
free to establish alternative conventions for the grouping of
priority values with the caveat that such conventions likely will
not be understood by all implementations.
</t>
</section>
</section>
<section anchor="object-ext" title="Additional Object Properties">
<t>
The following "additional properties" MAY be used with any
JSON Object serialized within an Activity Stream document.
</t>
<texttable>
<ttcol align="left" width="15%">Property</ttcol>
<ttcol align="left" width="21%">Value</ttcol>
<ttcol align="left">Description</ttcol>
<c>"alias"</c>
<c>IRI</c>
<c>
Provides a contextually meaningful alternative label for the
object in addition to the "@id". For instance, within some
systems, groups can be identified both by a unique global ID
and a more "human-friendly" label such as "@friends" or "@network".
The value of the "alias" property MUST match either the "isegment-nz-nc"
or the "IRI" production in <xref target="RFC3987"/>. The use of a
relative reference other than a simple name is not allowed.
</c>
<c>"attachment"</c>
<c><xref target="link">Link</xref> value</c>
<c>
A <xref target="link">Link</xref> value referencing one or more
objects associated with the containing object. These are similiar
in concept to files attached to an email message.
</c>
<c>"author"</c>
<c><xref target="link">Link</xref> value</c>
<c>
A <xref target="link">Link</xref> value referencing one or more
entity that created or authored the object.
</c>
<c>"content"</c>
<c><xref target="lang">Natural Language value</xref></c>
<c>
A Natural-language description of the object encoded as a single
JSON String containing HTML markup. Visual elements such as
thumbnail images MAY be included.
</c>
<c>"duplicate"</c>
<c><xref target="link">Link</xref> value</c>
<c>
A <xref target="link">Link</xref>value referencing one or more
objects that are semantically equivalent to this object or duplicate
this objects content. An object SHOULD contain a "duplicate"
property when there are known objects, possibly in a different
system, that are semantically equivalent or duplicate the content.
</c>
<c>"icon"</c>
<c><xref target="link">Link</xref> value</c>
<c>
A <xref target="link">Link</xref> value referencing one or more
visual, graphic representations of the object, intended for human
consumption. The visual element SHOULD have an aspect ratio of
one (horizontal) to one (vertical) and SHOULD be suitable for
presentation at a small size.
</c>
<c>"image"</c>
<c><xref target="link">Link</xref> value</c>
<c>
A <xref target="link">Link</xref> value referencing one or more
visual, graphic represenations of the object. Unlike the "icon"
property, there are no aspect ratio or display restrictions.
</c>
<c>"location"</c>
<c><xref target="link">Link</xref> value</c>
<c>
A <xref target="link">Link</xref> value describing one or more
physical or virtual locations associated with which the object.
</c>
<c>"published"</c>
<c><xref target="RFC3339"/> date-time</c>
<c>
The date and time at which the object was published.
</c>
<c>"generator"</c>
<c><xref target="link">Link</xref> value</c>
<c>
A <xref target="link">Link</xref> value referencing the
application that generated the object.
</c>
<c>"provider"</c>
<c><xref target="link">Link</xref> value</c>
<c>
A <xref target="link">Link</xref> value referencing the application
that published the object. Note that this is not necessarily the
same entity that generated the object.
</c>
<c>"source"</c>
<c><xref target="link">Link</xref> value</c>
<c>
A <xref target="link">Link</xref> value referencing the original
source of this object. The source property is closely related to
the generator and provider properties but serves the distinct
purpose of identifying where the object was originally published as
opposed to identifying the applications that generated or published it.
</c>
<c>"summary"</c>
<c><xref target="lang">Natural Language value</xref></c>
<c>
A Natural-language summarization of the object encoded as a single
JSON String containing HTML markup. Visual elements such as
thumbnail images can be included.
</c>
<c>"updated"</c>
<c><xref target="RFC3339"/> date-time</c>
<c>
The date and time at which a previously published object has
been modified.
</c>
<c>"startTime"</c>
<c><xref target="RFC3339"/> date-time</c>
<c>
A date-time describing the actual or expected starting time of
the object. When used within an Activity object, for instance,
the "startTime" specifies the moment the activity began or is
scheduled to begin.
</c>
<c>"endTime"</c>
<c><xref target="RFC3339" /> date-time</c>
<c>
A date-time describing the actual or expected ending time of
the object. When used within an Activity object, for instance,
the "endTime" specifies the moment the activity concluded or is
scheduled to conclude.
</c>
<c>"rating"</c>
<c>Decimal Number between 1.0 and 5.0</c>
<c>
A quality rating expressed as a number between 1.0 and 5.0
(inclusive) with one decimal place of precision.
</c>
<c>"tag"</c>
<c><xref target="link">Link</xref> value</c>
<c>
A <xref target="link">Link</xref> value referencing one or more
resources that are loosely associated with the containing object.
The "tag" and "attachment" properties differ from one another
in that the "tag" property asserts "association by reference"
while "attachment" asserts "association by enclosure".
</c>
<c>"title"</c>
<c><xref target="lang">Natural Language</xref> value</c>
<c>
A Natural-language title of the object encoded as a single
JSON String containing HTML markup.
</c>
<c>"duration"</c>
<c><xref target="RFC4627">JSON</xref> int</c>
<c>
When the object describes a time-based resource, such as audio
or video, the "duration" property indicates the approximate
length of time in seconds.
</c>
<c>"height"</c>
<c><xref target="RFC4627">JSON</xref> int</c>
<c>
When the object describes a visual resource, such as an
image, video or embeddable HTML page, the "height" property
indicates the recommended display height in pixels.
</c>
<c>"width"</c>
<c><xref target="RFC4627">JSON</xref> int</c>
<c>
When the object describes a visual resource, such as an
image, video or embeddable HTML page, the "width" property
indicates the recommended display width in pixels.
</c>
</texttable>
</section>
<section anchor="collection" title="Collection">
<t>
Collection objects are a specialization of the base
<xref target="object">Object</xref> that contain a
listing of other <xref target="object">objects</xref>
The Collection object is used primarily as the root of an
Activity Streams document as described in <xref target="document"/>,
but can be used as the value of object properties.
</t>
<t>
Collections have both a logical model and a physical
serialization. While the logical view of a collection
might contain a large number of objects, any single
serialized representation might include only a subset
of those objects, with specific <xref target="link">Link</xref>
values used to reference additional serialized representations
that include additional subsets. Such representations are known
as "multi-page collections", with each serialized subset
representing a single "page".
</t>
<t>
The value of the Collection object's "@type" property MUST
be "collection" unless the fact that the object is a collection
can be determined by context.
</t>
<t>
Collection objects extend the core <xref target="object">object</xref>
definition with the following additional properties:
</t>
<texttable>
<ttcol align="left" width="15%">Property</ttcol>
<ttcol align="left" width="21%">Value</ttcol>
<ttcol align="left">Description</ttcol>
<c>"totalItems"</c>
<c>Integer</c>
<c>
Non-negative integer specifying the total number of objects
contained by the logical view of the collection. This number
might not reflect the actual number of items serialized within
the Collection object instance.
</c>
<c>"items"</c>
<c>
Array of <xref target="object">Objects</xref>
</c>
<c>
An array containing a listing of <xref target="object">Objects</xref>
of any type.
</c>
<c>"itemsAfter"</c>
<c><xref target="RFC3339" /> date-time</c>
<c>
A RFC 3339 date-time that indicates that the collection contains
only items published or updated strictly after the date and time
specified.
</c>
<c>"itemsBefore"</c>
<c><xref target="RFC3339" /> date-time</c>
<c>
A RFC 3339 date-time that indicates that the collection contains
only items published or updated strictly before the date and time
specified.
</c>
<c>"itemsPerPage"</c>
<c>Integer</c>
<c>
A non-negative integer specifying the maximum number of items
that will be included in the value of the items array.
</c>
<c>"startIndex"</c>
<c>Integer</c>
<c>
A non-negative integer value identifying the relative position
within the logical view of collection of the first object
contained in the items property. For instance, if there are 20
items that are considered to be members of a collection, but
only the last 10 of those items are included in the items
property, the value of startIndex would be 10.
</c>
<c>"first"</c>
<c><xref target="link">Link</xref> value</c>
<c>
A <xref target="link">Link</xref> value referencing the
furthest preceeding page of a multi-page collection.
</c>
<c>"last"</c>
<c><xref target="link">Link</xref> value</c>
<c>
A <xref target="link">Link</xref> value referencing the
furthest following page of a multi-page collection.
</c>
<c>"prev"</c>
<c><xref target="link">Link</xref> value</c>
<c>
A <xref target="link">Link</xref> value referencing the
immediately preceding page of the multi-page collection. Note
that the property name previous can be used as an equivalent
alternative; however implementations SHOULD use prev and MUST
NOT use both prev AND previous within the same collection.
</c>
<c>"next"</c>
<c><xref target="link">Link</xref> value</c>
<c>
A <xref target="link">Link</xref> value referencing the immediately
following page of the multi-page collection.
</c>
<c>"current"</c>
<c><xref target="link">Link</xref> value</c>
<c>
A <xref target="link">Link</xref> value referencing the page
containing the items that have been updated or published most
recently.
</c>
<c>"self"</c>
<c><xref target="link">Link</xref> value</c>
<c>
A <xref target="link">Link</xref> value referencing this page.
</c>
</texttable>
</section>
</section>
<section anchor="document" title="The Activity Stream JSON Document">
<t>