diff options
author | Yehuda Sadeh <yehuda@inktank.com> | 2012-10-09 15:30:45 -0700 |
---|---|---|
committer | Yehuda Sadeh <yehuda@inktank.com> | 2012-10-23 10:43:09 -0700 |
commit | 86b06f12a97e48b6db9bfb8dbd0e121a34a2847e (patch) | |
tree | 7f1824dd52d74816edeb11b2e218987aeafbaec7 | |
parent | ccd757f019e4012a5c0ecde0ae623b7126964d35 (diff) | |
download | ceph-86b06f12a97e48b6db9bfb8dbd0e121a34a2847e.tar.gz |
json_spirit: update grammar
Support a more relaxed grammar, where last entity in an array
or an object can have a comma trailing.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
-rw-r--r-- | src/json_spirit/json_spirit_reader_template.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/json_spirit/json_spirit_reader_template.h b/src/json_spirit/json_spirit_reader_template.h index 93f64e49dc0..b814e916255 100644 --- a/src/json_spirit/json_spirit_reader_template.h +++ b/src/json_spirit/json_spirit_reader_template.h @@ -468,7 +468,7 @@ namespace json_spirit ;
members_
- = pair_ >> *( ',' >> pair_ )
+ = pair_ >> *( ',' >> pair_ | ch_p(',') )
;
pair_
@@ -484,7 +484,7 @@ namespace json_spirit ;
elements_
- = value_ >> *( ',' >> value_ )
+ = value_ >> *( ',' >> value_ | ch_p(',') )
;
string_
|