reference: Jsonize

git-svn-id: svn://ultimatepp.org/upp/trunk@4816 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2012-04-19 07:37:30 +00:00
parent 7ff2d860b3
commit 13d57fd6dc
5 changed files with 91 additions and 18 deletions

View file

@ -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 {