diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2012-12-11 03:55:19 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2012-12-11 03:55:19 +0000 |
commit | 5f29c3b769fcdb2532d4948aa1c649d4330304b9 (patch) | |
tree | 6f0ed37c27aa70679bf5a81341e07a9e0d5c5f68 /sca-cpp/trunk/modules/scheme/json-value.cpp | |
parent | ae0b7c0063db6236be2d7cf01ddbf2159f77c98c (diff) |
Use Jansson to read/write JSON instead of Mozilla SpiderMonkey.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1419986 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | sca-cpp/trunk/modules/scheme/json-value.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sca-cpp/trunk/modules/scheme/json-value.cpp b/sca-cpp/trunk/modules/scheme/json-value.cpp index 4bdf8bd37f..b5c1c25302 100644 --- a/sca-cpp/trunk/modules/scheme/json-value.cpp +++ b/sca-cpp/trunk/modules/scheme/json-value.cpp @@ -32,14 +32,13 @@ namespace tuscany { namespace scheme { -int jsonValue() { - const js::JSContext cx; - const failable<list<value> > lv = json::readJSON(streamList(cin), cx); - if (!hasContent(lv)) { - cerr << reason(lv) << " : " << rcode(lv); +const int jsonValue() { + const failable<value> v = json::readValue(streamList(cin)); + if (!hasContent(v)) { + cerr << reason(v) << " : " << rcode(v); return 1; } - cout << writeValue(content(lv)); + write(content(writeValue(content(v))), cout); return 0; } |