xBRL-JSON: mapping from Open Information Model 1.0

Public Working Draft 13 January 2016

Copyright © XBRL International Inc., All Rights Reserved.

This version:
<http://www.xbrl.org/Specification/xbrl-json/PWD-2016-01-13/xbrl-json-PWD-2016-01-13.html>
Editors:
Paul Warren, XBRL International Inc. < pdw@xbrl.org >
Herm Fischer, Mark V Systems Limited < fischer@markv.com >

Status

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.

Abstract

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.

Comment

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.

Table of Contents

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

Appendices

A References
B Intellectual property status (non-normative)
C Document History (non-normative)
D Errata Corrections incorporated in this document

Table

1 Namespaces and namespace prefixes

Examples

1 JSON example: simple fact
2 JSON example: tuple fact
3 JSON example: unit aspect (US dollars per share)
4 JSON example: language

Definitions

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)


1 Introduction

1.1 Terminology

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].

1.2 Namespaces and namespace prefixes

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.

Table 1: Namespaces and namespace prefixes
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

2 JSON mapping documentation conventions

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:

3 Identifiers in xBRL-JSON

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:

  1. Unprefixed names are not permitted; there is no default namespace.
  2. A URI may only be bound to a single prefix within a document.
  3. A prefix may only be bound to a single URI within a document; prefixes may not be re-bound.
[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. ]

4 XBRL Report Model (non-GL)

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.

JSON Object: Report
This object represents an OIM report component.
Members:
dtsReferences (array)
An array of DTS reference objects corresponding to the members of the {dts-references} property.
facts (array)
An array of simple fact and tuple fact objects corresponding to the members of the {facts} property.
prefixes (object)
A prefixes object defining the prefixes used by any SQName in this report (see Section 3).
JSON Object: Simple Fact

A simple fact component is represented by an object with the following members.

Members:
id (string)
The value of the {id} property if present, otherwise absent.
value (string)

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.

numericValue (number)
If the fact is a numeric simple fact then the value of the {value} property expressed as a JSON number, otherwise absent. This member is provided for convenience. As most JSON implementations will use a fixed-precision double for number types, it is technically an approximation of the arbitrary precision required by XBRL.
booleanValue (true or false)
If the fact is a boolean simple fact then the JSON literal 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.
accuracy (number or "infinity")
The value of the {accuracy} property.
baseType (string)
The value of the {base datatype} property, expressed as a SQName.
Aspects
A set of JSON pairs representing the members of the {aspects} property. The JSON Pairs to be used are defined in Section 4.1.
footnotes (array)
An array of footnote JSON Objects, corresponding to the members of the {footnotes} property.

Example 1: JSON example: simple fact

{ "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", }

JSON Object: Tuple Fact
A tuple fact component is represented by an XML element in the xbrli:tuple substitution group.
Members:
id (string)
The value of the {id} property if present, otherwise a generated, unique identifier for the tuple fact. The {id} MUST be a valid NCName.
footnotes (array)
An array of footnote JSON Objects, corresponding to the members of the {footnotes} property.

Example 2: JSON example: tuple fact

{ "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, }

JSON Object: Prefixes

A JSON object mapping short prefixes to namespace URIs. This specification places no constraint on how prefixes are chosen.

Properties:
prefix (string)
prefix MUST be an NCName (as defined in [XML Names]). The value MUST be a valid URI (as defined in [URI]), and MUST be unique amongst the values in the object.
JSON Object: DTS Reference
This object represents a DTS reference component.
Members:
href (string)
The value of the {href} property of the DTS reference component.
type (string)
The string "schema" or "linkbase", determined by the value of the {type} property of the DTS reference component.

4.1 Aspects

JSON Pair: Concept Core Aspect
This pair represents the entity core aspect component.
name
An SQName representing oim:concept
value (string)
The {value} property expressed as an SQName.
JSON Pair: Entity Core Aspect
This pair represents the entity core aspect component.
name
A SQName representing oim:entity
value (object)
An SQName representing the {scheme} and {identifier} properties of the entity core aspect as the URI and localpart, respectively.
JSON Pair: Period Core Aspect
This pair represents the entity core aspect component.
name
A SQName representing oim:period
value (string)
A value representing the {interval} property of the aspect, determined as follows:
  • If the {interval} property is 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.

JSON Pair: Unit Core Aspect
A pair representing the entity core aspect.
name
An SQName representing oim:unit
value (object)
A unit object.
JSON Object: Unit
Members:
numerators (array)
An array of SQNames corresponding to the members of the {numerators} property of the aspect. The members should be represented as described in Section 3.
denominators (array)
An array of SQNames corresponding to the members of the {denominators} property of the aspect. The members should be represented as described in Section 3. This pair MAY omitted if {demoninators} is an empty list.

Example 3: JSON example: unit aspect (US dollars per share)

"oim:unit": { "numerators": [ "iso4217:USD" ], "denominators": [ "xbrli:shares" ], }

JSON Pair: Tuple parent aspect
This pair represents the tuple parent aspect.
name
An SQName corresponding to oim:tupleParent
factRef (string)
The value of the id member of the tuple fact object that represents the fact identified by the {parent} property.
JSON Pair: Tuple order aspect
This pair represents the tuple order aspect.
name
An SQName corresponding to oim:tupleParent
value (number)
The value of the {order} property of the aspect.
JSON Pair: Language Core Aspect
name
The expanded name corresponding to oim:language
value (string)
The value of the {language} property of language core aspect.

Example 4: JSON example: language

"oim:language": "en-US"

JSON Pair: Taxonomy-defined Aspect
This pair is repeated for each taxonomy-defined aspect present on the fact.
name
The value of the {name} property of the taxonomy-defined aspect, expressed as a SQName.
value
A taxonomy-defined aspect JSON object.
JSON Object: Taxonomy-defined Aspect Value
Members:
value (string)
The value of the {value} property, expressed as a string in a lexical representation that is valid according to the XML Schema datatype [XML Schema Datatypes] of the aspect, or if {value} is "nil" then the JSON literal, null.
numericValue (number)
If the type of aspect is, or is derived from, xsd:decimal, xsd:float or xsd:double then the value of the {value} property, expressed as a JSON number. This property is absent otherwise.
booleanValue (true or false)
If the type of the aspect is, or is derived from, xsd:boolean, then the JSON value true or false corresponding to the {value} property. This property is absent otherwise.
baseType (string)
The value of the {base datatype} property, expressed as a SQName.

4.2 Footnotes

JSON Object: Footnote
This object represents a footnote OIM component.
Members:
group (string)
The value of the {group} property.
footnoteType (string)
The value of the {footnote type} property.
factRef (string)
If the footnote is a fact footnote then the value of the id member of the fact's JSON representation. This member is absent otherwise.
footnote (string)
If the footnote is a text footnote then the value of the {value} property. This member is absent otherwise.
language (string)
If the footnote is a text footnote then the value of the {language} property, if present, and absent otherwise.

Appendix A References

DIMENSIONS
XBRL International Inc.. "XBRL Dimensions 1.0"
Ignacio Hernández-Ros
, and Hugh Wallis.
(See http://www.xbrl.org/Specification/XDT-REC-2006-09-18.htm)
IETF RFC 2119
IETF (Internet Engineering Task Force). "RFC 2119: Key words for use in RFCs to Indicate Requirement Levels"
Scott Bradner.

(See http://www.ietf.org/rfc/rfc2119.txt)
JSON
Internet Engineering Task Force. "The JavaScript Object Notation (JSON) Data Interchange Format"
(See https://tools.ietf.org/html/rfc7159)
OIM
XBRL International Inc.. "XBRL Open Information Model"
Paul Warren.

(See )
URI
IETF (Internet Engineering Task Force). "RFC 3986: Uniform Resource Identifier (URI): Generic Syntax"
T. Berners-Lee
, L. Masinter, and R. Fielding.
(See http://tools.ietf.org/html/rfc3986)
XBRL 2.1
XBRL International Inc.. "Extensible Business Reporting Language (XBRL) 2.1 Includes Corrected Errata Up To 2013-02-20"
Phillip Engel
, Walter Hamscher, Geoff Shuetrim, David vun Kannon, and Hugh Wallis.
(See http://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html)
XML Names
W3C (World Wide Web Consortium). "Namespaces in XML 1.0 (Third Edition)"
(See http://www.w3.org/TR/2009/REC-xml-names-20091208)
XML Schema Datatypes
W3C (World Wide Web Consortium). "XML Schema Part 2: Datatypes Second Edition"
Paul V. Biron
, and Ashok Malhotra.
(See http://www.w3.org/TR/xmlschema-2/)

Appendix B Intellectual property status (non-normative)

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).

Appendix C Document History (non-normative)

DateAuthorDetails
04 June 2015

First Public Working Draft

Appendix D Errata Corrections incorporated in this document

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.