nv-json-flat-ary-desc
v1.0.4
Published
nv-json-flat-ary-desc ======================= - for generate C++/C struct from json. cli/repl using - dont include it in your project , its slow - simple-version of nvyson
Downloads
2
Readme
nv-json-flat-ary-desc
- for generate C++/C struct from json. cli/repl using
- dont include it in your project , its slow
- simple-version of nvyson
install
- npm install nv-json-flat-ary-desc
splitted
usage
const x = require("nv-json-flat-ary-desc");
example
var j = {
n:null,
t:true,
f:false,
N:0,
S:"",
A:[
null,true,false,1.1,"s",
[null,true,false,2.2,"ss"],
{n:null,t:true,f:false,N:3.3, S:"sss"}
],
D:{A:[],D:{}}
}
var ctx = x.flat_desc(j)
ctx.show();
/*
> ctx.show()
si | ei | t | ipl | kpl | chks | chts | seq
0 | 1 | "n" | [0] | ["n"] | [] | [] | 0
1 | 2 | "B" | [1] | ["t"] | [] | [] | 1
2 | 3 | "B" | [2] | ["f"] | [] | [] | 2
3 | 4 | "N" | [3] | ["N"] | [] | [] | 3
4 | 5 | "S" | [4] | ["S"] | [] | [] | 4
5 | 6 | "n" | [5,0] | ["A",0] | [] | [] | 5
6 | 7 | "B" | [5,1] | ["A",1] | [] | [] | 6
7 | 8 | "B" | [5,2] | ["A",2] | [] | [] | 7
8 | 9 | "N" | [5,3] | ["A",3] | [] | [] | 8
9 | 10 | "S" | [5,4] | ["A",4] | [] | [] | 9
10 | 11 | "n" | [5,5,0] | ["A",5,0] | [] | [] | 10
11 | 12 | "B" | [5,5,1] | ["A",5,1] | [] | [] | 11
12 | 13 | "B" | [5,5,2] | ["A",5,2] | [] | [] | 12
13 | 14 | "N" | [5,5,3] | ["A",5,3] | [] | [] | 13
14 | 15 | "S" | [5,5,4] | ["A",5,4] | [] | [] | 14
10 | 15 | "A" | [5,5] | ["A",5] | [0,1,2,3,4] | ["n","B","B","N","S"] | 15
15 | 16 | "n" | [5,6,0] | ["A",6,"n"] | [] | [] | 16
16 | 17 | "B" | [5,6,1] | ["A",6,"t"] | [] | [] | 17
17 | 18 | "B" | [5,6,2] | ["A",6,"f"] | [] | [] | 18
18 | 19 | "N" | [5,6,3] | ["A",6,"N"] | [] | [] | 19
19 | 20 | "S" | [5,6,4] | ["A",6,"S"] | [] | [] | 20
15 | 20 | "D" | [5,6] | ["A",6] | ["n","t","f","N","S"] | ["n","B","B","N","S"] | 21
5 | 20 | "A" | [5] | ["A"] | [0,1,2,3,4,5,6] | ["n","B","B","N","S","A","D"] | 22
20 | 20 | "A" | [6,0] | ["D","A"] | [] | [] | 23
20 | 20 | "D" | [6,1] | ["D","D"] | [] | [] | 24
20 | 20 | "D" | [6] | ["D"] | ["A","D"] | ["A","D"] | 25
0 | 20 | "D" | [] | [] | ["n","t","f","N","S","A","D"] | ["n","B","B","N","S","A","D"] | 26
*/
/*
> ctx.non_leaf_ele_named
{ '["A",5]': 5, '["A",6]': 6 }
>
> ctx.store
[
null, true, false, 0,
'', null, true, false,
1.1, 's', null, true,
false, 2.2, 'ss', null,
true, false, 3.3, 'sss'
]
>
*/
/*
ctx.children ctx.ipl2seq ctx.kpl2seq
*/
METHODS
APIS
LICENSE
- ISC