Copyright © XBRL International Inc., All Rights Reserved.
Circulation of this Candidate Recommendation is unrestricted. This document is normative. Other documents may supersede this document. Recipients are invited to submit comments to oim@xbrl.org, and to submit notification of any relevant patent rights of which they are aware and provide supporting documentation.
This document defines xBRL-JSON, a standardised JSON-based representation of data in an XBRL Report. The format is defined in the form of mappings from the XBRL Open Information Model, a syntax-independent definition of the data represented by an XBRL v2.1 instance document.
1 Paul Warren:
PWD: The Working Group would value feedback on the merit of the SQName
approach. The group considered the more verbose, but simpler and directly
comparable Clark notation ("{URI}localname"), but is currently in favour of the
more terse and readable QName-like approach. The definition of SQName has
relaxed the format of the localname in order to allow it to be used for entity
identifiers.
1 Introduction
1.1 Terminology
1.2 Namespaces and namespace prefixes
2 JSON mapping documentation conventions
3 Identifiers in xBRL-JSON
4 JSON representation constraints
5 XBRL Report Model (non-GL)
5.1 Aspects
5.2 Footnotes
A References
B Intellectual property status (non-normative)
C Document History (non-normative)
D Errata Corrections incorporated in this document
1 Namespaces and namespace prefixes
1 JSON example: simple fact
2 JSON example: tuple fact
3 JSON example: unit aspect (US dollars per share)
4 JSON example: language
5 JSON example: a text footnote
6 JSON example: a fact footnote
Aspects (JSON Object)
Concept core aspect (JSON Member)
DTS reference (JSON Object)
Entity core aspect (JSON Member)
Footnote (JSON Object)
Language core aspect (JSON Member)
Period core aspect (JSON Members)
Prefix (JSON Member)
Prefixes (JSON Object)
Report (JSON Object)
Simple fact (JSON Object)
Taxonomy-defined aspect (JSON Member)
Tuple fact (JSON Object)
Tuple order aspect (JSON Member)
Tuple parent aspect (JSON Member)
Unit core aspect (JSON Member)
The key words MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, in this specification, are to be interpreted as described in [IETF RFC 2119].
The keywords expanded name, NCName and QName are to be interpreted as described in the XML Names specification [XML Names].
The keywords SQName, prefix map and unit string representation are to be interpreted as described in the OIM Common Definitions specification [OIMCOMMON].
Many values in the Open Information Model are XML expanded names, the
combination of a namespace URI and a localname. This specification
uses QName notation in the form prefix:localname
to
refer to these, where the prefix is a short string representing a
full namespace URI. The prefixes used by this specification are
defined below.
As described in [OIMCOMMON], prefixes starting with "xbrl" are considered reserved, and use of the URIs associated with such prefixes MUST use that prefix if included in a prefix map in an xBRL-JSON document.
Prefix | Namespace URI |
---|---|
xbrl | http://www.xbrl.org/CR/2016-12-14/oim |
xbrli | http://www.xbrl.org/2003/instance |
This document is intended to define a bi-directional mapping between the Open Information Model and an xBRL-JSON document. The transformation from xBRL-JSON back to the model not explicitly described, but may be inferred from the model to JSON mappings, taken in conjunction with the constraints defined in the Open Information Model, and those defined in the XBRL v2.1 [XBRL 2.1] and XBRL Dimensions v1.0 [DIMENSIONS] specifications applied to the xBRL-XML representation of that model.
The mapping is defined as a series of tables describing JSON components [JSON] that represent components in the XBRL Open Information Model [OIM]. Tables define the following types of JSON components:
xBRL-JSON makes use of SQNames to represent expanded names and some other values. The prefix map for resolving SQNames is provided by the prefixes object.
[Paul Warren: PWD: The Working Group would value feedback on the merit of the SQName approach. The group considered the more verbose, but simpler and directly comparable Clark notation ("{URI}localname"), but is currently in favour of the more terse and readable QName-like approach. The definition of SQName has relaxed the format of the localname in order to allow it to be used for entity identifiers. ]RFC 7159 [JSON] does not prohibit a JSON object from having multiple occurrences of the same key, but states that behaviour of such objects is unpredictable. In order to avoid interoperability issues, objects within JSON documents conforming to this specification MUST have unique keys.
The section describes how each component defined in the Open Information Model is mapped to a corresponding JSON representation.
An xBRL-JSON document consists of a report object, as defined below.
A simple fact component is represented by an object with the following members.
The value of the {value} property of the fact in a lexical
representation that is valid according to the XML Schema datatype [XML Schema Datatypes], or
in the case of nil-valued facts, the JSON literal null
.
Facts of type xsd:QName
are expressed as SQNames, and MUST use a prefix that is defined in the prefixes object.
{ "id": "f923", "value": "1234", "aspects": { "xbrl:concept": "tax:NumericConcept", "xbrl:entity": "cid:123456789", "xbrl:periodStart": "2015-01-01T00:00:00", "xbrl:periodEnd": "2016-01-01T00:00:00", "xbrl:unit": "iso4217:GBP", "tax:RegionDimension": "tax:Europe" } }
{ "id": "f123", "aspects": { "xbrl:concept": "tax:TupleConcept" } }, { "id": "f124", "value": "This is a simple fact value", "aspects": { "xbrl:concept": "tax:StringConcept", "xbrl:entity": "cid:123456789", "xbrl:periodStart": "2015-01-01T00:00:00", "xbrl:periodEnd": "2016-01-01T00:00:00", "xbrl:tupleParent": "f123", "xbrl:tupleOrder": 1 } }, { "id": "f125", "value": "Last year's simple fact value", "aspects": { "xbrl:concept": "tax:StringConcept", "xbrl:entity": "cid:123456789", "xbrl:periodStart": "2014-01-01T00:00:00", "xbrl:periodEnd": "2015-01-01T00:00:00", "xbrl:tupleParent": "f123", "xbrl:tupleOrder": 2 } }
A JSON object providing a mapping of short prefixes to namespace URIs for use within SQNames appearing within the current JSON document.
xbrl:concept
xbrl:entity
xbrl:periodStart
.An ISO 8601 date time representations of the start of the duration denoted by the {interval} property.
xbrl:periodEnd
.An ISO 8601 date time representations of the end of the duration denoted by the {interval} property.
The representations used for xbrl:periodStart
, and
xbrl:periodEnd
values MUST be valid
according to the xsd:dateTime
datatype. It
should be noted that unlike the xbrli:dateUnion
type used in xBRL-XML, the xsd:dateTime
datatype
used here does not allow the time component to be omitted.
xbrl:unit
"xbrl:unit": "iso4217:USD/xbrli:shares"
xbrl:tupleParent
id
member of the tuple fact object that represents the fact identified by the {parent} property.
xbrl:tupleParent
xbrl:language
"xbrl:language": "en-US"
The value of the {value} property of the fact in a lexical
representation that is valid according to the XML Schema datatype of the aspect, or
in the case of nil-valued aspects, the JSON literal null
.
Aspects of type xsd:QName
are expressed as SQNames, and MUST use a prefix that is defined in the prefixes object.
id
member of the fact's JSON representation. This member is absent otherwise.{ "id": "f923", "value": "1234", "aspects": { "xbrl:concept": "tax:NumericConcept", "xbrl:entity": "cid:123456789", "xbrl:periodStart": "2015-01-01T00:00:00", "xbrl:periodEnd": "2016-01-01T00:00:00", "xbrl:unit": "iso4217:GBP", }, "footnotes": [ { "group": "http://example.com/role/link1", "footnoteType": "http://www.xbrl.org/2003/arcrole/fact-footnote", "footnote": "Footnote text", "language": "en" } ] }
{ "id": "f923", "value": "1234", "aspects": { "xbrl:concept": "tax:NumericConcept", "xbrl:entity": "cid:123456789", "xbrl:periodStart": "2015-01-01T00:00:00", "xbrl:periodEnd": "2016-01-01T00:00:00", "xbrl:unit": "iso4217:GBP" }, "footnotes": [ { "group": "http://example.com/role/link1", "footnoteType": "http://www.xbrl.org/2009/arcrole/fact-explanatoryFact", "factRef": "f924" } ] }, { "id": "f924", "value": "Some text explaining the other fact", "aspects": { "xbrl:concept": "tax:StringConcept", "xbrl:entity": "cid:123456789", "xbrl:periodStart": "2014-01-01T00:00:00", "xbrl:periodEnd": "2015-01-01T00:00:00", } }
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to XBRL International or XBRL organizations, except as required to translate it into languages other than English. Members of XBRL International agree to grant certain licenses under the XBRL International Intellectual Property Policy (www.xbrl.org/legal).
This document and the information contained herein is provided on an "AS IS" basis and XBRL INTERNATIONAL DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
The attention of users of this document is directed to the possibility that compliance with or adoption of XBRL International specifications may require use of an invention covered by patent rights. XBRL International shall not be responsible for identifying patents for which a license may be required by any XBRL International specification, or for conducting legal inquiries into the legal validity or scope of those patents that are brought to its attention. XBRL International specifications are prospective and advisory only. Prospective users are responsible for protecting themselves against liability for infringement of patents. XBRL International takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Members of XBRL International agree to grant certain licenses under the XBRL International Intellectual Property Policy (www.xbrl.org/legal).
Date | Author | Details |
---|---|---|
04 June 2015 | Paul Warren |
First Public Working Draft |
14 December 2016 | Paul Warren |
Candidate Recommendation |
This appendix contains a list of the errata that have been incorporated into this document. This represents all those errata corrections that have been approved by the XBRL International Specification Maintenance Working Group (SWG) up to and including 14 December 2016. Hyperlinks to relevant e-mail threads may only be followed by those who have access to the relevant mailing lists. Access to internal XBRL mailing lists is restricted to members of XBRL International Inc.
No errata have been incorporated into this document.