This wiki is locked. Future workgroup activity and specification development must take place at
our new wiki
. For more information, see
this blog post about the new governance model
and
this post about changes to the website
.
TWiki
>
Main Web
>
OslcCore
>
OslcCoreSpecification
>
OSLCCoreSpecAppendixRepresentations
>
UpdatedJSONGuidelines10102011
(10 Oct 2011,
MichaelFiedler
)
(raw view)
-- Main.MichaelFiedler - 10 Oct 2011 These are the *property rules* referred to above. For each property: * 1.0 For each property of a resource * 1.1 Add field to the resource's JSON object with name set to Prefixed Name of property * 1.1.1 If the property is specified as a single-valued property, then make field's value literal or JSON Object * 1.1.2 If the property is specified as a multi-valued property, then make field's value JSON Array * 1.2 If value-type is *Literal* * %RED%1.2.1 If value-type is a Literal String, DateTime or XMLLiteral, set the field's value to a JSON string representation of the property value. %ENDCOLOR% * %RED%1.2.2 If value-type is a Literal numeric (Integer, Decimal, Double, Float), set the field's value to a JSON number. %ENDCOLOR% * %RED%1.2.3 If value-type is a Literal boolean, set the field's value to a JSON boolean. %ENDCOLOR% * 1.3 Else if value-type is *Resource* with representation of *Reference* * 1.3.1 Set field's value to JSON object with field: * =rdf:resource= set to URI of resource * 1.3.2 If the resource reference is part of an Anchor (as described in Link Guidance) and has annotating property values, then include these properties within the JSON object. * 1.4 Else if value-type is *Local Resource* with representation of *Reference* * 1.4.1 Set field's value to JSON object with field: * =rdf:nodeID= set to local ID of resource * 1.5 Else if value-type is *Resource* with representation of *Inline* * 1.5.1 Set field's value to JSON object with fields: * =rdf:about= set to URI of resource whose values are being inlined * Represent properties of inlined resource (using these same rules) * 1.6 Else if value-type is *Local Resource* with representation of *Inline* * 1.6.1 Set field's value to JSON object with fields: * =rdf:nodeID= set to local ID you wish to assign to this resource. Only needed when Local Resource needs to refer to this resource. * Represent properties of inlined resource (using these same rules)
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r1 - 10 Oct 2011 - 15:55:32 -
MichaelFiedler
Main
Main Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
Webs
Main
Sandbox
TWiki
Български
Cesky
Dansk
Deutsch
English
Español
Français
Italiano
日本語
Nederlands
Polski
Português
Русский
Svenska
简体中文
簡體中文
Copyright � by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Contributions are governed by our
Terms of Use
Ideas, requests, problems regarding this site?
Send feedback