Hello community,

here is the log from the commit of package jsoncpp for openSUSE:Factory checked 
in at 2015-02-25 02:18:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/jsoncpp (Old)
 and      /work/SRC/openSUSE:Factory/.jsoncpp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "jsoncpp"

Changes:
--------
--- /work/SRC/openSUSE:Factory/jsoncpp/jsoncpp.changes  2015-02-18 
12:09:29.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.jsoncpp.new/jsoncpp.changes     2015-02-25 
02:18:34.000000000 +0100
@@ -1,0 +2,10 @@
+Tue Feb 24 14:10:36 UTC 2015 - [email protected]
+
+- Update to 1.4.4
+  * The odd allowDroppedNullPlaceholders feature of Readers 
+    (corresponding to dropNullPlaceholders in Writers) can be 
+    helpful when parsing javascript as JSON, when null elements 
+    have been discarded.
+- Build doc package as noarch
+
+-------------------------------------------------------------------

Old:
----
  1.4.2.tar.gz

New:
----
  1.4.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ jsoncpp.spec ++++++
--- /var/tmp/diff_new_pack.DkzkbB/_old  2015-02-25 02:18:35.000000000 +0100
+++ /var/tmp/diff_new_pack.DkzkbB/_new  2015-02-25 02:18:35.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           jsoncpp
-Version:        1.4.2
+Version:        1.4.4
 Release:        0
 Summary:        C++ library that allows manipulating with JSON
 License:        MIT
@@ -58,6 +58,7 @@
 %package doc
 Summary:        Documentation for %{name}
 Group:          Documentation
+BuildArch:      noarch
 
 %description doc
 JSON is a lightweight data-interchange format. It can represent numbers,
@@ -112,7 +113,6 @@
 %doc AUTHORS LICENSE NEWS.txt README.md
 %{_libdir}/pkgconfig/%{name}.pc
 %{_libdir}/lib%{name}.so
-
 %{_includedir}/json/
 
 %files doc

++++++ 1.4.2.tar.gz -> 1.4.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsoncpp-1.4.2/amalgamate.py 
new/jsoncpp-1.4.4/amalgamate.py
--- old/jsoncpp-1.4.2/amalgamate.py     2015-02-15 10:01:26.000000000 +0100
+++ new/jsoncpp-1.4.4/amalgamate.py     2015-02-19 22:37:57.000000000 +0100
@@ -59,7 +59,7 @@
     print("Amalgating header...")
     header = AmalgamationFile(source_top_dir)
     header.add_text("/// Json-cpp amalgated header 
(http://jsoncpp.sourceforge.net/).")
-    header.add_text("/// It is intented to be used with #include <%s>" % 
header_include_path)
+    header.add_text('/// It is intended to be used with #include "%s"' % 
header_include_path)
     header.add_file("LICENSE", wrap_in_comment=True)
     header.add_text("#ifndef JSON_AMALGATED_H_INCLUDED")
     header.add_text("# define JSON_AMALGATED_H_INCLUDED")
@@ -85,7 +85,7 @@
     print("Amalgating forward header...")
     header = AmalgamationFile(source_top_dir)
     header.add_text("/// Json-cpp amalgated forward header 
(http://jsoncpp.sourceforge.net/).")
-    header.add_text("/// It is intented to be used with #include <%s>" % 
forward_header_include_path)
+    header.add_text('/// It is intended to be used with #include "%s"' % 
forward_header_include_path)
     header.add_text("/// This header provides forward declaration for all 
JsonCpp types.")
     header.add_file("LICENSE", wrap_in_comment=True)
     header.add_text("#ifndef JSON_FORWARD_AMALGATED_H_INCLUDED")
@@ -105,10 +105,15 @@
     print("Amalgating source...")
     source = AmalgamationFile(source_top_dir)
     source.add_text("/// Json-cpp amalgated source 
(http://jsoncpp.sourceforge.net/).")
-    source.add_text("/// It is intented to be used with #include <%s>" % 
header_include_path)
+    source.add_text('/// It is intended to be used with #include "%s"' % 
header_include_path)
     source.add_file("LICENSE", wrap_in_comment=True)
     source.add_text("")
-    source.add_text("#include <%s>" % header_include_path)
+    source.add_text('#include "%s"' % header_include_path)
+    source.add_text("""
+#ifndef JSON_IS_AMALGAMATION
+#error "Compile with -I PATH_TO_JSON_DIRECTORY"
+#endif
+""")
     source.add_text("")
     lib_json = "src/lib_json"
     source.add_file(os.path.join(lib_json, "json_tool.h"))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsoncpp-1.4.2/include/json/assertions.h 
new/jsoncpp-1.4.4/include/json/assertions.h
--- old/jsoncpp-1.4.2/include/json/assertions.h 2015-02-15 10:01:26.000000000 
+0100
+++ new/jsoncpp-1.4.4/include/json/assertions.h 2015-02-19 22:37:57.000000000 
+0100
@@ -16,7 +16,7 @@
 #if JSON_USE_EXCEPTION
 #include <stdexcept>
 #define JSON_ASSERT(condition)                                                 
\
-  assert(condition); // @todo <= change this into an exception throw
+  if (!(condition)) {throw std::runtime_error( "assert json failed" );} // 
@todo <= add detail about condition in exception
 #define JSON_FAIL_MESSAGE(message) do{std::ostringstream oss; oss << message; 
throw std::runtime_error(oss.str());}while(0)
 //#define JSON_FAIL_MESSAGE(message) throw std::runtime_error(message)
 #else // JSON_USE_EXCEPTION
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsoncpp-1.4.2/include/json/version.h 
new/jsoncpp-1.4.4/include/json/version.h
--- old/jsoncpp-1.4.2/include/json/version.h    2015-02-15 10:01:26.000000000 
+0100
+++ new/jsoncpp-1.4.4/include/json/version.h    2015-02-19 22:37:57.000000000 
+0100
@@ -4,10 +4,10 @@
 #ifndef JSON_VERSION_H_INCLUDED
 # define JSON_VERSION_H_INCLUDED
 
-# define JSONCPP_VERSION_STRING "1.4.2"
+# define JSONCPP_VERSION_STRING "1.4.4"
 # define JSONCPP_VERSION_MAJOR 1
 # define JSONCPP_VERSION_MINOR 4
-# define JSONCPP_VERSION_PATCH 2
+# define JSONCPP_VERSION_PATCH 4
 # define JSONCPP_VERSION_QUALIFIER
 # define JSONCPP_VERSION_HEXA ((JSONCPP_VERSION_MAJOR << 24) | 
(JSONCPP_VERSION_MINOR << 16) | (JSONCPP_VERSION_PATCH << 8))
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsoncpp-1.4.2/src/lib_json/json_reader.cpp 
new/jsoncpp-1.4.4/src/lib_json/json_reader.cpp
--- old/jsoncpp-1.4.2/src/lib_json/json_reader.cpp      2015-02-15 
10:01:26.000000000 +0100
+++ new/jsoncpp-1.4.4/src/lib_json/json_reader.cpp      2015-02-19 
22:37:57.000000000 +0100
@@ -200,6 +200,8 @@
     }
     break;
   case tokenArraySeparator:
+  case tokenObjectEnd:
+  case tokenArrayEnd:
     if (features_.allowDroppedNullPlaceholders_) {
       // "Un-read" the current token and mark the current value as a null
       // token.
@@ -209,8 +211,7 @@
       currentValue().setOffsetStart(current_ - begin_ - 1);
       currentValue().setOffsetLimit(current_ - begin_);
       break;
-    }
-  // Else, fall through...
+    } // Else, fall through...
   default:
     currentValue().setOffsetStart(token.start_ - begin_);
     currentValue().setOffsetLimit(token.end_ - begin_);
@@ -1160,6 +1161,8 @@
     }
     break;
   case tokenArraySeparator:
+  case tokenObjectEnd:
+  case tokenArrayEnd:
     if (features_.allowDroppedNullPlaceholders_) {
       // "Un-read" the current token and mark the current value as a null
       // token.
@@ -1169,8 +1172,7 @@
       currentValue().setOffsetStart(current_ - begin_ - 1);
       currentValue().setOffsetLimit(current_ - begin_);
       break;
-    }
-  // Else, fall through...
+    } // else, fall through ...
   default:
     currentValue().setOffsetStart(token.start_ - begin_);
     currentValue().setOffsetLimit(token.end_ - begin_);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsoncpp-1.4.2/src/test_lib_json/main.cpp 
new/jsoncpp-1.4.4/src/test_lib_json/main.cpp
--- old/jsoncpp-1.4.2/src/test_lib_json/main.cpp        2015-02-15 
10:01:26.000000000 +0100
+++ new/jsoncpp-1.4.4/src/test_lib_json/main.cpp        2015-02-19 
22:37:57.000000000 +0100
@@ -1862,6 +1862,158 @@
   delete reader;
 }
 
+struct CharReaderAllowDropNullTest : JsonTest::TestCase {};
+
+JSONTEST_FIXTURE(CharReaderAllowDropNullTest, issue178) {
+  Json::CharReaderBuilder b;
+  b.settings_["allowDroppedNullPlaceholders"] = true;
+  Json::Value root;
+  std::string errs;
+  Json::CharReader* reader(b.newCharReader());
+  {
+    char const doc[] = "{\"a\":,\"b\":true}";
+    bool ok = reader->parse(
+        doc, doc + std::strlen(doc),
+        &root, &errs);
+    JSONTEST_ASSERT(ok);
+    JSONTEST_ASSERT_STRING_EQUAL("", errs);
+    JSONTEST_ASSERT_EQUAL(2u, root.size());
+    JSONTEST_ASSERT_EQUAL(Json::nullValue, root.get("a", true));
+  }
+  {
+    char const doc[] = "{\"a\":}";
+    bool ok = reader->parse(
+        doc, doc + std::strlen(doc),
+        &root, &errs);
+    JSONTEST_ASSERT(ok);
+    JSONTEST_ASSERT_STRING_EQUAL("", errs);
+    JSONTEST_ASSERT_EQUAL(1u, root.size());
+    JSONTEST_ASSERT_EQUAL(Json::nullValue, root.get("a", true));
+  }
+  {
+    char const doc[] = "[]";
+    bool ok = reader->parse(
+        doc, doc + std::strlen(doc),
+        &root, &errs);
+    JSONTEST_ASSERT(ok);
+    JSONTEST_ASSERT(errs == "");
+    JSONTEST_ASSERT_EQUAL(0u, root.size());
+    JSONTEST_ASSERT_EQUAL(Json::arrayValue, root);
+  }
+  {
+    char const doc[] = "[null]";
+    bool ok = reader->parse(
+        doc, doc + std::strlen(doc),
+        &root, &errs);
+    JSONTEST_ASSERT(ok);
+    JSONTEST_ASSERT(errs == "");
+    JSONTEST_ASSERT_EQUAL(1u, root.size());
+  }
+  {
+    char const doc[] = "[,]";
+    bool ok = reader->parse(
+        doc, doc + std::strlen(doc),
+        &root, &errs);
+    JSONTEST_ASSERT(ok);
+    JSONTEST_ASSERT_STRING_EQUAL("", errs);
+    JSONTEST_ASSERT_EQUAL(2u, root.size());
+  }
+  {
+    char const doc[] = "[,,,]";
+    bool ok = reader->parse(
+        doc, doc + std::strlen(doc),
+        &root, &errs);
+    JSONTEST_ASSERT(ok);
+    JSONTEST_ASSERT_STRING_EQUAL("", errs);
+    JSONTEST_ASSERT_EQUAL(4u, root.size());
+  }
+  {
+    char const doc[] = "[null,]";
+    bool ok = reader->parse(
+        doc, doc + std::strlen(doc),
+        &root, &errs);
+    JSONTEST_ASSERT(ok);
+    JSONTEST_ASSERT_STRING_EQUAL("", errs);
+    JSONTEST_ASSERT_EQUAL(2u, root.size());
+  }
+  {
+    char const doc[] = "[,null]";
+    bool ok = reader->parse(
+        doc, doc + std::strlen(doc),
+        &root, &errs);
+    JSONTEST_ASSERT(ok);
+    JSONTEST_ASSERT(errs == "");
+    JSONTEST_ASSERT_EQUAL(2u, root.size());
+  }
+  {
+    char const doc[] = "[,,]";
+    bool ok = reader->parse(
+        doc, doc + std::strlen(doc),
+        &root, &errs);
+    JSONTEST_ASSERT(ok);
+    JSONTEST_ASSERT_STRING_EQUAL("", errs);
+    JSONTEST_ASSERT_EQUAL(3u, root.size());
+  }
+  {
+    char const doc[] = "[null,,]";
+    bool ok = reader->parse(
+        doc, doc + std::strlen(doc),
+        &root, &errs);
+    JSONTEST_ASSERT(ok);
+    JSONTEST_ASSERT_STRING_EQUAL("", errs);
+    JSONTEST_ASSERT_EQUAL(3u, root.size());
+  }
+  {
+    char const doc[] = "[,null,]";
+    bool ok = reader->parse(
+        doc, doc + std::strlen(doc),
+        &root, &errs);
+    JSONTEST_ASSERT(ok);
+    JSONTEST_ASSERT_STRING_EQUAL("", errs);
+    JSONTEST_ASSERT_EQUAL(3u, root.size());
+  }
+  {
+    char const doc[] = "[,,null]";
+    bool ok = reader->parse(
+        doc, doc + std::strlen(doc),
+        &root, &errs);
+    JSONTEST_ASSERT(ok);
+    JSONTEST_ASSERT(errs == "");
+    JSONTEST_ASSERT_EQUAL(3u, root.size());
+  }
+  {
+    char const doc[] = "[[],,,]";
+    bool ok = reader->parse(
+        doc, doc + std::strlen(doc),
+        &root, &errs);
+    JSONTEST_ASSERT(ok);
+    JSONTEST_ASSERT_STRING_EQUAL("", errs);
+    JSONTEST_ASSERT_EQUAL(4u, root.size());
+    JSONTEST_ASSERT_EQUAL(Json::arrayValue, root[0u]);
+  }
+  {
+    char const doc[] = "[,[],,]";
+    bool ok = reader->parse(
+        doc, doc + std::strlen(doc),
+        &root, &errs);
+    JSONTEST_ASSERT(ok);
+    JSONTEST_ASSERT_STRING_EQUAL("", errs);
+    JSONTEST_ASSERT_EQUAL(4u, root.size());
+    JSONTEST_ASSERT_EQUAL(Json::arrayValue, root[1u]);
+  }
+  {
+    char const doc[] = "[,,,[]]";
+    bool ok = reader->parse(
+        doc, doc + std::strlen(doc),
+        &root, &errs);
+    JSONTEST_ASSERT(ok);
+    JSONTEST_ASSERT(errs == "");
+    JSONTEST_ASSERT_EQUAL(4u, root.size());
+    JSONTEST_ASSERT_EQUAL(Json::arrayValue, root[3u]);
+  }
+  delete reader;
+}
+
 struct IteratorTest : JsonTest::TestCase {};
 
 JSONTEST_FIXTURE(IteratorTest, distance) {
@@ -1925,6 +2077,8 @@
   JSONTEST_REGISTER_FIXTURE(runner, CharReaderFailIfExtraTest, 
commentAfterArray);
   JSONTEST_REGISTER_FIXTURE(runner, CharReaderFailIfExtraTest, 
commentAfterBool);
 
+  JSONTEST_REGISTER_FIXTURE(runner, CharReaderAllowDropNullTest, issue178);
+
   JSONTEST_REGISTER_FIXTURE(runner, IteratorTest, distance);
 
   return runner.runCommandLine(argc, argv);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsoncpp-1.4.2/version new/jsoncpp-1.4.4/version
--- old/jsoncpp-1.4.2/version   2015-02-15 10:01:26.000000000 +0100
+++ new/jsoncpp-1.4.4/version   2015-02-19 22:37:57.000000000 +0100
@@ -1 +1 @@
-1.4.2
+1.4.4

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to