Skip to content

Latest commit

 

History

History
20 lines (12 loc) · 603 Bytes

README.md

File metadata and controls

20 lines (12 loc) · 603 Bytes

XBRL file converter from XML to JSON format

Convert XBRL-based financial/business document from XML to JSON format, according to XBRL Consortium recommendations (xbrl-json-CR-2021-02-03).

Quickstart example

Here is an simple command line tool to convert xbrl file to json

use Datalane\XBRL\Instance;
use Datalane\JSONFile;

require __DIR__ . '/../vendor/autoload.php';

$x = new SimpleXMLElement(file_get_contents($argv[1]));


$inst = new Instance($x);
echo JSONFile::convertInstance($inst);