Skip to content

Commit 149e0e9

Browse files
committed
Added README
1 parent 1976c5c commit 149e0e9

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# XBRL file converter from XML to JSON format
2+
3+
Convert XBRL-based financial/business document from XML to JSON format, according to XBRL Consortium recommendations ([xbrl-json-CR-2021-02-03](https://www.xbrl.org/Specification/xbrl-json/CR-2021-02-03/xbrl-json-CR-2021-02-03.html)).
4+
5+
## Quickstart example
6+
7+
Here is an simple command line tool to convert xbrl file to json
8+
9+
```php
10+
use Datalane\XBRL\Instance;
11+
use Datalane\JSONFile;
12+
13+
require __DIR__ . '/../vendor/autoload.php';
14+
15+
$x = new SimpleXMLElement(file_get_contents($argv[1]));
16+
17+
18+
$inst = new Instance($x);
19+
echo JSONFile::convertInstance($inst);
20+
```

bin/test.php

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)