Copyright © XBRL International Inc., All Rights Reserved.
Circulation of this Public Working Draft 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 represent 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 XBRL Report Model (non-GL)
4.1 Aspects
4.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
Concept Core Aspect (JSON Pair)
DTS Reference (JSON Object)
Entity Core Aspect (JSON Pair)
Footnote (JSON Object)
Language Core Aspect (JSON Pair)
Period Core Aspect (JSON Pair)
Prefixes (JSON Object)
Report (JSON Object)
Simple Fact (JSON Object)
SQName
Taxonomy-defined Aspect (JSON Pair)
Taxonomy-defined Aspect Value (JSON Object)
Tuple Fact (JSON Object)
Tuple order aspect (JSON Pair)
Tuple parent aspect (JSON Pair)
Unit (JSON Object)
Unit Core Aspect (JSON Pair)
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].
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.
Prefix | Namespace URI |
---|---|
oim | http://www.xbrl.org/PWD/2016-01-13/oim |
xbrli | http://www.xbrl.org/2003/instance |
xsd | http://www.w3.org/2001/XMLSchema |
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:
The Open Information Model makes extensive use of expanded names ([XML Names]) to provide globally unique identifiers. These are a namespace URI/localname pair. In order to reduce size and improve readability, xBRL-JSON supports a QName-like mechanism for representing these (and some other) values, referred to as an SQName ("Simplified QName"). An SQName is a compact, colon-separated represention of a URI/value pair, where a short, document-scoped, prefix is used to represent the URI.
A SQName has the following format:
prefix:localname
The prefix MUST be a valid NCName and MUST correspond to a key in the prefixes object, with a value containing the actual namespace URI. Unlike QNames, the localname may be any string, including those containing the colon (":") character; the prefix and localname in an SQName are separated by the first colon character. Where an SQName is used to represent an expanded name, the localname will be a valid NCName.
SQNames are similar to QNames appearing within XML documents, but have the following differences:
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, or
in the case of nil-valued facts, the JSON literal null
.
The value property will always be present. For numeric and boolean
facts, additional, alternative representations are provided using native JSON
types as numericValue
and booleanValue
.
This string version is provided as a lossless alternative for numeric
values, as implementations of JSON numbers can only be expected to
have double precision.
true
or false
corresponding to the {value}
property. This member is absent otherwise. This member is provided
as a convenience, providing a native JSON boolean value.
{ "id": "f923", "value": "1234", "numericValue": 1234, "baseType": "xsd:decimal", "oim:concept": "tax:NumericConcept", "oim:entity": "cid:123456789", "oim:period": "2015-01-01T00:00:00/P1Y", "oim:unit": "iso4217:GBP", }
xbrli:tuple
substitution group.
{ "id": "f123", "oim:concept": "tax:TupleConcept", }, { "id": "f124", "stringValue": "This is a simple fact value", "baseType": "xsd:string", "oim:concept": "tax:StringConcept", "oim:entity": "cid:123456789", "oim:period": "2015-01-01T00:00:00/P1Y", "oim:tupleParent": "f123", "oim:tupleOrder": 1, }, { "id": "f125", "stringValue": "Last year's simple fact value", "baseType": "xsd:string", "oim:concept": "tax:StringConcept", "oim:entity": "cid:123456789", "oim:period": "2014-01-01T00:00:00/P1Y", "oim:tupleParent": "f123", "oim:tupleOrder": 2, }
A JSON object mapping short prefixes to namespace URIs. This specification places no constraint on how prefixes are chosen.
oim:period
forever
then the string "forever".Otherwise, an ISO 8601 time interval representing the {interval} property, expressed in one of the following forms:
<start>/<end>
<start>/<duration>
<duration>/<end>
Where <start>
and <end>
are valid according to the xsd:dateTime
datatype, and <duration>
is valid according to xsd:duration
. 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.
"oim:unit": { "numerators": [ "iso4217:USD" ], "denominators": [ "xbrli:shares" ], }
oim:tupleParent
id
member of the tuple fact object that represents the fact identified by the {parent} property.
oim:tupleParent
oim:language
"oim:language": "en-US"
null
.
xsd:decimal
, xsd:float
or xsd:double
then the value of the {value} property, expressed as a JSON number. This property is absent otherwise.
xsd:boolean
, then the JSON value true
or false
corresponding to the {value} property. This property is absent otherwise.
id
member of the fact's JSON representation. This member is absent otherwise.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 |
First Public Working Draft |
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 13 January 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.