From e6c34b3ded20e8b75198effd3e7b4237eb62817d Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Tue, 18 May 2010 18:08:15 +0000 Subject: [PATCH] allow trailing comma (,) in objects, which is allowed per the spec (thanks to Matthew Williams for the fix) git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1912 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- apps/jsonrpc/jsonArg.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/jsonrpc/jsonArg.cpp b/apps/jsonrpc/jsonArg.cpp index c0f266f8..638fba36 100644 --- a/apps/jsonrpc/jsonArg.cpp +++ b/apps/jsonrpc/jsonArg.cpp @@ -161,6 +161,9 @@ bool object_parse(std::istream& input, AmArg& res) { do { std::string key; if (!parse_string(input, &key)) { + if (match("}",input,true)) { + return true; + } return false; } if (!match(":", input)) {