SunSpecOrangeButton / pyoblib

Orange Button Python Library
Apache License 2.0
14 stars 19 forks source link

Updates to XBRL JSON format #77

Closed joelebwf closed 5 years ago

joelebwf commented 5 years ago

Per Campbell Pryde

The updated candidate release of XBRL JSON was approved today. A fact now looks like this:

{ "f923": { "value": "1234", "aspects": { "concept": "tax:NumericConcept", "entity": "cid:123456789", "period": "2015-01-01T00:00:00/2016-01-01T00:00:00", "unit": "iso4217:GBP", "tax:RegionDimension": "tax:Europe" } } } NOTE: The period format has been changed to a single period dimension with a / to separate dates. To represent a point in time a single date is used If it is forever no period is used. The fact Id is no defined as an index value. In this case f923.

See the attached specification. You need to create a folder called: xBRL-JSON_ mapping from Open Information Model 1.0_files and put the attached css file in it so it renders properly in html.

xbrl-JSON.pdf

cwhanse commented 5 years ago

I hope that timezone information is preserved in xBRL-JSON.

jonoxia commented 5 years ago

where does that Fact ID come from? is it just the 923rd fact in the document so it's called "f923" ?

joelebwf commented 5 years ago

One thing I am confused on is the data types of values. I think integers should be integers (1234), not json strings ("1234") but the specification is not clear on this point. In my mind Booleans and Floats also should be their respective JSON data type. I am going to approve and merge but also send this question to Campbell - we can open up another issue to deal with his answer if need be.

joelebwf commented 5 years ago

According to campbell all XBRL JSON values are in string format ("1234" instead of 1234 and "true" instead of true). The one exception is null which uses the JSON null.