mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-25 14:22:54 -06:00
reference: Jsonize
git-svn-id: svn://ultimatepp.org/upp/trunk@4816 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
7ff2d860b3
commit
13d57fd6dc
5 changed files with 91 additions and 18 deletions
|
|
@ -4,7 +4,10 @@ using namespace Upp;
|
|||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
Value js = ParseJSON(LoadFile(GetDataFile("test.json")));
|
||||
StdLogSetup(LOG_COUT|LOG_FILE);
|
||||
|
||||
String s = LoadFile(GetDataFile("test.json"));
|
||||
Value js = ParseJSON(s)[0];
|
||||
DUMP(js);
|
||||
DUMP(js["age"]);
|
||||
Value phone_number = js["phoneNumber"];
|
||||
|
|
@ -19,9 +22,6 @@ CONSOLE_APP_MAIN
|
|||
DUMP(AsJSON(js));
|
||||
|
||||
LOG("- Partial parsing");
|
||||
ValueArray va;
|
||||
va << js << js << js;
|
||||
String s = AsJSON(va);
|
||||
DUMP(s);
|
||||
CParser p2(s);
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue