Skip to content

Commit

Permalink
Update tap-core-person-schema-create-json-representation.adoc
Browse files Browse the repository at this point in the history
  • Loading branch information
khazelton authored Nov 6, 2020
1 parent f7fce53 commit ec4920a
Showing 1 changed file with 15 additions and 18 deletions.
33 changes: 15 additions & 18 deletions tap-core-person-schema-create-json-representation.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
TAP Schema: How to Create a JSON Representation
===============================
#
## TAP Schema: How to Create a JSON Representation
:Date: November 2020
:Revision: v1.1.0

Expand All @@ -8,8 +8,7 @@ TAP Schema: How to Create a JSON Representation
Copyright (C) 2020
University Corporation for Advanced Internet Development, Inc.

About the JSON Representation
-----------------------------
### About the JSON Representation
The TAP Schema JSON Representation describes how to represent TAP
attributes in JSON. For compactness, this document uses the term "TS-JSON" to
refer to the JSON Representation of the TAP Schema.
Expand Down Expand Up @@ -59,8 +58,7 @@ in the Core Schema.
}
----

Attribute Representation
------------------------
### Attribute Representation
Within the TS-JSON object, each attribute key is the corresponding Core Schema
attribute. The plural name is used when the attribute may have multiple values,
regardless of whether or not multiple values are conveyed in any given
Expand All @@ -70,8 +68,7 @@ used even if only one email address is being sent across the wire.
TS-JSON defines several different representations for attributes. It is up to
each Protocol to determine which formats to use in which context.

Simple Attribute
~~~~~~~~~~~~~~~~
### Simple Attribute
A _Simple Attribute_ is a single key/value pair, where the value is an
appropriate JSON type (ie: neither an object nor an array).

Expand All @@ -82,8 +79,8 @@ appropriate JSON type (ie: neither an object nor an array).
}
----

Simple Attribute With Multiple Values
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
### Simple Attribute With Multiple Values

To represent multiple values for a simple attribute, a JSON array is used
with the plural attribute name.

Expand All @@ -97,8 +94,8 @@ with the plural attribute name.
}
----

Simple Attribute With Metadata
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
### Simple Attribute With Metadata

Adding metadata to a simple attribute requires the use of a JSON object, which
will have two keys: _meta_ and _value_. _value_ is of an appropriate JSON type
(neither an object nor an array), while _meta_ is a JSON object holding the
Expand Down Expand Up @@ -142,8 +139,8 @@ key/value pairs or, if appropriate, sub-objects.
}
----

Complex Attribute With Multiple Values
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
### Complex Attribute With Multiple Values

To represent multiple values for a complex object, a JSON array is used with
the plural attribute name.

Expand All @@ -165,8 +162,8 @@ the plural attribute name.
}
----

Complex Attribute With Metadata
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
### Complex Attribute With Metadata

Metadata can be added to complex attributes in two ways, depending on what the
metadata is intended to represent. A _meta_ block applied to the JSON object
itself applies to the entire complex attribute. Additionally, component
Expand All @@ -193,8 +190,8 @@ to each component.
}
----

Ad Hoc Attributes
~~~~~~~~~~~~~~~~~
### Ad Hoc Attributes

Ad Hoc Attributes are namespaced using the namespace, a colon `:`, and the
attribute name. For example: `university.edu:provider`. Ad Hoc attributes may
be used anywhere a Core Schema attribute or subattribute may be used.
Expand Down

0 comments on commit ec4920a

Please sign in to comment.