diff --git a/tap-core-person-schema-create-json-representation.adoc b/tap-core-person-schema-create-json-representation.adoc index d36c04e..b34435c 100644 --- a/tap-core-person-schema-create-json-representation.adoc +++ b/tap-core-person-schema-create-json-representation.adoc @@ -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 @@ -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. @@ -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 @@ -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). @@ -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. @@ -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 @@ -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. @@ -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 @@ -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.