avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From th...@apache.org
Subject svn commit: r1335985 - in /avro/trunk: CHANGES.txt lang/c++/impl/json/JsonIO.cc lang/c++/test/JsonTests.cc
Date Wed, 09 May 2012 08:33:38 GMT
Author: thiru
Date: Wed May  9 08:33:38 2012
New Revision: 1335985

URL: http://svn.apache.org/viewvc?rev=1335985&view=rev
Log:
AVRO-1080. JsonIO.cc should allow \u escape sequence in string

Modified:
    avro/trunk/CHANGES.txt
    avro/trunk/lang/c++/impl/json/JsonIO.cc
    avro/trunk/lang/c++/test/JsonTests.cc

Modified: avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=1335985&r1=1335984&r2=1335985&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Wed May  9 08:33:38 2012
@@ -40,6 +40,8 @@ Avro 1.7.0 (unreleased)
 
     AVRO-1070. AvroSequenceFileOutputFormat is in wrong package. (thiru)
 
+    AVRO-1080. JsonIO.cc should allow \u escape sequence in string. (Keh-Li Sheng via thiru)
+
 Avro 1.6.3 (5 March 2012)
 
   IMPROVEMENTS

Modified: avro/trunk/lang/c++/impl/json/JsonIO.cc
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c%2B%2B/impl/json/JsonIO.cc?rev=1335985&r1=1335984&r2=1335985&view=diff
==============================================================================
--- avro/trunk/lang/c++/impl/json/JsonIO.cc (original)
+++ avro/trunk/lang/c++/impl/json/JsonIO.cc Wed May  9 08:33:38 2012
@@ -265,6 +265,7 @@ JsonParser::Token JsonParser::tryString(
             case 't':
                 sv.push_back('\t');
                 continue;
+            case 'u':
             case 'U':
                 {
                     unsigned int n = 0;

Modified: avro/trunk/lang/c++/test/JsonTests.cc
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c%2B%2B/test/JsonTests.cc?rev=1335985&r1=1335984&r2=1335985&view=diff
==============================================================================
--- avro/trunk/lang/c++/test/JsonTests.cc (original)
+++ avro/trunk/lang/c++/test/JsonTests.cc Wed May  9 08:33:38 2012
@@ -61,6 +61,8 @@ TestData<double> doubleData[] = {
 TestData<const char*> stringData[] = {
     { "\"\"", etString, "" },
     { "\"a\"", etString, "a" },
+    { "\"\\U000a\"", etString, "\n" },
+    { "\"\\u000a\"", etString, "\n" },
     { "\"\\\"\"", etString, "\"" },
     { "\"\\/\"", etString, "/" },
 };



Mime
View raw message