summaryrefslogtreecommitdiff
path: root/db/json.cpp
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2009-12-30 17:55:57 -0500
committerMathias Stearn <mathias@10gen.com>2009-12-30 17:56:44 -0500
commit692b618d7d43df3a6ceb86d03d38052918f57b27 (patch)
tree7c374370c351e2b3645ac0e8bf1f468a430f11f3 /db/json.cpp
parentb04c8cfe2567fb54a1e1706e78f45940658adb7c (diff)
downloadmongo-692b618d7d43df3a6ceb86d03d38052918f57b27.tar.gz
JSON parser supports 'new Date(1234)' SERVER-461
Diffstat (limited to 'db/json.cpp')
-rw-r--r--db/json.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/json.cpp b/db/json.cpp
index 924d84bbc90..e5a7fef843d 100644
--- a/db/json.cpp
+++ b/db/json.cpp
@@ -509,7 +509,7 @@ public:
// TODO: this will need to use a signed parser at some point
date = dateS | dateT;
dateS = ch_p( '{' ) >> "\"$date\"" >> ':' >> uint_parser< Date_t >()[ dateValue( self.b ) ] >> '}';
- dateT = str_p( "Date" ) >> '(' >> uint_parser< Date_t >()[ dateValue( self.b ) ] >> ')';
+ dateT = !str_p("new") >> str_p( "Date" ) >> '(' >> uint_parser< Date_t >()[ dateValue( self.b ) ] >> ')';
regex = regexS | regexT;
regexS = ch_p( '{' ) >> "\"$regex\"" >> ':' >> str[ regexValue( self.b ) ] >> ',' >> "\"$options\"" >> ':' >> lexeme_d[ '"' >> ( *( alpha_p ) )[ regexOptions( self.b ) ] >> '"' ] >> '}';