// File: swxlion[P]swxJson/tests/swxJsonParseTest.cpp
// Function: parseTest(char const*, char const*)
void parseTest(const char *filenme, const char *path)
{
	std::string content;
	std::ifstream in(filenme, std::ios::in);
	if (in.is_open())
	{
		std::istreambuf_iterator<char> beg(in), end;
		content = std::string(beg, end);
		in.close();
	}
	else
	{
		cout<<"[Error]: Cannot open the file "<<filenme<<endl;
		return;
	}

	try {
		JsonPtr json = Json::parse(content.c_str());
		cout<<"get json:"<<endl;
		cout<<json<<endl<<endl;
		cout<<"get value by path "<<path<<endl;
		cout<<(*json)[path]<<endl;
		cout<<json->getNode(path)->str()<<endl;
		cout<<json->wantString(path)<<endl;
	}
	catch (const JsonError &e)
	{
		cout<<"[Error]: "<<e.message()<<" line: "<<e.lineNumber()<<", fun: "<<e.function()<<endl;
	}
}

// Assembly:
subq $0x458, %rsp            # imm = 0x458
movq %rdi, 0x450(%rsp)
movq %rsi, 0x448(%rsp)
leaq 0x428(%rsp), %rdi
callq 0x23480
movq 0x450(%rsp), %rsi
leaq 0x220(%rsp), %rdi
movl $0x8, %edx
callq 0x235a0
jmp 0x23800
leaq 0x220(%rsp), %rdi
callq 0x234d0
movb %al, 0xdf(%rsp)
jmp 0x23816
movb 0xdf(%rsp), %al
testb $0x1, %al
jne 0x23826
jmp 0x23956
leaq 0x200(%rsp), %rdi
leaq 0x220(%rsp), %rsi
callq 0x24050
leaq 0x1f0(%rsp), %rdi
callq 0x240b0
movups 0x200(%rsp), %xmm0
movaps %xmm0, 0x1c0(%rsp)
movups 0x1f0(%rsp), %xmm0
movaps %xmm0, 0x1b0(%rsp)
leaq 0x1af(%rsp), %rdi
movq %rdi, 0xd0(%rsp)
callq 0x23560
movq 0xd0(%rsp), %r9
movq 0x1c0(%rsp), %rsi
movl 0x1c8(%rsp), %edx
movq 0x1b0(%rsp), %rcx
movl 0x1b8(%rsp), %r8d
leaq 0x1d0(%rsp), %rdi
callq 0x240e0
jmp 0x238b3
leaq 0x428(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
movq %rsi, 0xc8(%rsp)
callq 0x23410
movq 0xc8(%rsp), %rdi
callq 0x231d0
leaq 0x1af(%rsp), %rdi
callq 0x233b0
leaq 0x220(%rsp), %rdi
callq 0x230a0
jmp 0x238f9
jmp 0x239b8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x23f8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x23f82
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x1af(%rsp), %rdi
callq 0x233b0
jmp 0x23f82
movq 0x2867b(%rip), %rdi     # 0x4bfd8
leaq 0x1c6a0(%rip), %rsi     # 0x40004
callq 0x23320
movq %rax, 0xc0(%rsp)
jmp 0x23973
movq 0xc0(%rsp), %rdi
movq 0x450(%rsp), %rsi
callq 0x23320
movq %rax, 0xb8(%rsp)
jmp 0x23992
movq 0xb8(%rsp), %rdi
movq 0x28617(%rip), %rsi     # 0x4bfb8
callq 0x23380
jmp 0x239a8
movl $0x1, 0x1a8(%rsp)
jmp 0x23f43
leaq 0x428(%rsp), %rdi
callq 0x23110
movq %rax, %rsi
leaq 0x198(%rsp), %rdi
callq 0x3aee0
jmp 0x239d7
movq 0x285fa(%rip), %rdi     # 0x4bfd8
leaq 0x1c63e(%rip), %rsi     # 0x40023
callq 0x23320
movq %rax, 0xb0(%rsp)
jmp 0x239f4
movq 0xb0(%rsp), %rdi
movq 0x285b5(%rip), %rsi     # 0x4bfb8
callq 0x23380
jmp 0x23a0a
leaq 0x188(%rsp), %rdi
movq %rdi, 0xa0(%rsp)
leaq 0x198(%rsp), %rsi
callq 0x24180
movq 0xa0(%rsp), %rsi
movq 0x285a2(%rip), %rdi     # 0x4bfd8
callq 0x25470
movq %rax, 0xa8(%rsp)
jmp 0x23a45
movq 0xa8(%rsp), %rdi
movq 0x28564(%rip), %rsi     # 0x4bfb8
callq 0x23380
movq %rax, 0x98(%rsp)
jmp 0x23a63
movq 0x98(%rsp), %rdi
movq 0x28546(%rip), %rsi     # 0x4bfb8
callq 0x23380
jmp 0x23a79
leaq 0x188(%rsp), %rdi
callq 0x241b0
movq 0x2854b(%rip), %rdi     # 0x4bfd8
leaq 0x1c599(%rip), %rsi     # 0x4002d
callq 0x23320
movq %rax, 0x90(%rsp)
jmp 0x23aa3
movq 0x90(%rsp), %rdi
movq 0x448(%rsp), %rsi
callq 0x23320
movq %rax, 0x88(%rsp)
jmp 0x23ac2
movq 0x88(%rsp), %rdi
movq 0x284e7(%rip), %rsi     # 0x4bfb8
callq 0x23380
jmp 0x23ad8
leaq 0x198(%rsp), %rdi
callq 0x241c0
movq %rax, %rdi
movq 0x448(%rsp), %rsi
callq 0x2ba80
movq %rax, 0x80(%rsp)
jmp 0x23aff
movq 0x80(%rsp), %rsi
movq 0x284ca(%rip), %rdi     # 0x4bfd8
callq 0x24f50
movq %rax, 0x78(%rsp)
jmp 0x23b1a
movq 0x78(%rsp), %rdi
movq 0x28492(%rip), %rsi     # 0x4bfb8
callq 0x23380
jmp 0x23b2d
leaq 0x198(%rsp), %rdi
callq 0x241f0
movq %rax, 0x60(%rsp)
movq 0x448(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0x137(%rsp), %rdi
movq %rdi, 0x70(%rsp)
callq 0x23560
movq 0x70(%rsp), %rdx
leaq 0x1c4d6(%rip), %rsi     # 0x40040
leaq 0x138(%rsp), %rdi
callq 0x242e0
jmp 0x23b79
movq 0x68(%rsp), %rdx
movq 0x60(%rsp), %rsi
leaq 0x158(%rsp), %rdi
leaq 0x138(%rsp), %rcx
callq 0x24200
jmp 0x23b9a
leaq 0x158(%rsp), %rdi
callq 0x241f0
movq %rax, %rsi
leaq 0x168(%rsp), %rdi
callq 0x254a0
jmp 0x23bb9
movq 0x28418(%rip), %rdi     # 0x4bfd8
leaq 0x168(%rsp), %rsi
callq 0x232e0
movq %rax, 0x58(%rsp)
jmp 0x23bd4
movq 0x58(%rsp), %rdi
movq 0x283d8(%rip), %rsi     # 0x4bfb8
callq 0x23380
jmp 0x23be7
leaq 0x168(%rsp), %rdi
callq 0x231d0
leaq 0x158(%rsp), %rdi
callq 0x241b0
leaq 0x138(%rsp), %rdi
callq 0x231d0
leaq 0x137(%rsp), %rdi
callq 0x233b0
leaq 0x198(%rsp), %rdi
callq 0x241f0
movq %rax, 0x40(%rsp)
movq 0x448(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0xef(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x23560
movq 0x50(%rsp), %rdx
leaq 0x1c3e8(%rip), %rsi     # 0x40040
leaq 0xf0(%rsp), %rdi
callq 0x242e0
jmp 0x23c67
movq 0x48(%rsp), %rdx
movq 0x40(%rsp), %rsi
leaq 0x110(%rsp), %rdi
leaq 0xf0(%rsp), %rcx
callq 0x243a0
jmp 0x23c88
movq 0x28349(%rip), %rdi     # 0x4bfd8
leaq 0x110(%rsp), %rsi
callq 0x232e0
movq %rax, 0x38(%rsp)
jmp 0x23ca3
movq 0x38(%rsp), %rdi
movq 0x28309(%rip), %rsi     # 0x4bfb8
callq 0x23380
jmp 0x23cb6
leaq 0x110(%rsp), %rdi
callq 0x231d0
leaq 0xf0(%rsp), %rdi
callq 0x231d0
leaq 0xef(%rsp), %rdi
callq 0x233b0
leaq 0x198(%rsp), %rdi
callq 0x241b0
jmp 0x23f38
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x23e47
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x23e3a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x188(%rsp), %rdi
callq 0x241b0
jmp 0x23e3a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x23dc4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x23db7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x23daa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x168(%rsp), %rdi
callq 0x231d0
leaq 0x158(%rsp), %rdi
callq 0x241b0
leaq 0x138(%rsp), %rdi
callq 0x231d0
leaq 0x137(%rsp), %rdi
callq 0x233b0
jmp 0x23e3a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x23e2d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x23e20
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x231d0
leaq 0xf0(%rsp), %rdi
callq 0x231d0
leaq 0xef(%rsp), %rdi
callq 0x233b0
leaq 0x198(%rsp), %rdi
callq 0x241b0
movl 0x214(%rsp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x23f82
movq 0x218(%rsp), %rdi
callq 0x23100
movq %rax, 0xe0(%rsp)
movq 0x28161(%rip), %rdi     # 0x4bfd8
leaq 0x1c1c5(%rip), %rsi     # 0x40043
callq 0x23320
movq %rax, 0x30(%rsp)
jmp 0x23e8a
movq 0xe0(%rsp), %rdi
callq 0x24480
movq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x232e0
movq %rax, 0x28(%rsp)
jmp 0x23eab
movq 0x28(%rsp), %rdi
leaq 0x1c196(%rip), %rsi     # 0x4004d
callq 0x23320
movq %rax, 0x20(%rsp)
jmp 0x23ec3
movq 0xe0(%rsp), %rdi
callq 0x24490
movq 0x20(%rsp), %rdi
movl %eax, %esi
callq 0x23530
movq %rax, 0x18(%rsp)
jmp 0x23ee3
movq 0x18(%rsp), %rdi
leaq 0x1c166(%rip), %rsi     # 0x40055
callq 0x23320
movq %rax, 0x10(%rsp)
jmp 0x23efb
movq 0xe0(%rsp), %rdi
callq 0x244a0
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x23320
movq %rax, 0x8(%rsp)
jmp 0x23f1c
movq 0x8(%rsp), %rdi
movq 0x28090(%rip), %rsi     # 0x4bfb8
callq 0x23380
jmp 0x23f2f
callq 0x23500
jmp 0x23f36
jmp 0x23f38
movl $0x0, 0x1a8(%rsp)
leaq 0x220(%rsp), %rdi
callq 0x230d0
leaq 0x428(%rsp), %rdi
callq 0x231d0
addq $0x458, %rsp            # imm = 0x458
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
callq 0x23500
jmp 0x23f80
jmp 0x23f82
leaq 0x220(%rsp), %rdi
callq 0x230d0
leaq 0x428(%rsp), %rdi
callq 0x231d0
movq 0x218(%rsp), %rdi
callq 0x23550
movq %rax, %rdi
callq 0x244b0
nopw %cs:(%rax,%rax)