jin-tree 1.0.2
Tree - fast, simple structural data format
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
Tree
Simple fast compact user-readable binary-safe extensible structural format.
more - better | JSON | XML | YAML | INI | Tree |
---|---|---|---|---|---|
Readability | 3 | 1 | 4 | 5 | 5 |
Edit-friendly | 3 | 1 | 4 | 5 | 5 |
Deep hierarchy | 3 | 3 | 3 | 1 | 5 |
Simple to implement | 3 | 2 | 1 | 5 | 5 |
Performance | 3 | 1 | 1 | 5 | 5 |
Size | 3 | 1 | 4 | 5 | 5 |
Streaming | 0 | 0 | 5 | 5 | 5 |
Binary-safe | 0 | 0 | 0 | 0 | 5 |
Universality | 4 | 3 | 3 | 1 | 5 |
Prevalence | 5 | 5 | 3 | 3 | 0 |
Text editors support | 5 | 5 | 3 | 5 | 1 |
Languages support | 4 | 5 | 3 | 5 | 1 |
Syntax highlighting for IDEA: https://plugins.jetbrains.com/plugin/7459
Parsing:
string data = cast(string) read( "path/to/file.tree" ); // read from file
Tree tree = Tree.parse( data , "http://example.org/source/uri" ); // parse to tree
Simple queries:
Tree userNames = tree.select( "user name" ); // returns name-nodes
Tree userNamesValues = tree.select( "user name " ); // returns value-nodes
Node api:
string name = userNames[0].name; // get node name
string stringValue = userNames[0].value; // get value as string with "\n" as delimiter
uint intValue = userNames[0].value!uint; // get value converted from string to another type
Tree[] childs = tree.childs; // get child nodes array
string uri = tree.uri; // get uri like "http://example.org/source/uri#3:2"
Serialization:
string data = tree.toString(); // returns string representation of tree
tree.pipe( stdout ); // prints tree to output buffer
- Registered by nin jin
- 1.0.2 released 9 years ago
- nin-jin/tree.d
- public domain
- Copyright © 2015, jin
- Authors:
- Dependencies:
- none
- Versions:
-
3.0.0 2016-Sep-11 2.0.0 2015-Nov-22 1.2.0 2015-Nov-09 1.1.1 2015-Oct-10 1.1.0 2015-Oct-10 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
399 downloads total
-
- Score:
- 2.4
- Short URL:
- jin-tree.dub.pm