]> git.evergreen-ils.org Git - OpenSRF.git/commit
1. Replace the old JSON parser (jsonParseString()) with a newer, faster one
authorscottmk <scottmk@9efc2488-bf62-4759-914b-345cdb29e865>
Mon, 12 Oct 2009 18:09:18 +0000 (18:09 +0000)
committerscottmk <scottmk@9efc2488-bf62-4759-914b-345cdb29e865>
Mon, 12 Oct 2009 18:09:18 +0000 (18:09 +0000)
commit6533e0c01058f6b18b81dcdadb4d132382e2548f
tree9f575e511c98e809a5d497ed95ea80a233778b01
parent13d185aa8e9433f8bb125bb47a938a173203f7a4
1. Replace the old JSON parser (jsonParseString()) with a newer, faster one
(jsonParse()).

2. Because the new JSON parser is strict about syntax errors that the old
parser would ignore, it was necessary to parse the srfsh command line more
intelligently.  Otherwise it would be impossible to build a JSON string
internally with reliably correct syntax.

Hence: instead of using strtok() to break up the command line into tokens, we
now use a rudimentary recursive descent parser to isolate JSON strings as
distinct arguments, even if they contain embedded white space.

As a fairly benign side effect of these changes, the treatment of commas
in the command line is changing a bit.  All parts of the command line
(not just JSON strings) may now be optionally separated by commas.

3. We now use an osrfStringArray to hold the results of parsing, rather
than a bare array of pointers.

4. The function formerly known as "parse_request" is now named "process_request",
because it does a lot more than just parsing.

M    src/srfsh/srfsh.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1817 9efc2488-bf62-4759-914b-345cdb29e865
src/srfsh/srfsh.c