data-lane / xbrl-xml2json
DataLane's XBRL report from XML to JSON converter
Installs: 1 390
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/data-lane/xbrl-xml2json
Requires
- php: >=8.1
- ext-simplexml: *
Requires (Dev)
- phpstan/phpstan: ^1.8
- phpunit/phpunit: ^9.2
README
Convert XBRL-based financial/business document from XML to JSON format, according to XBRL Consortium recommendations (xbrl-json-REC-2021-10-13).
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);