diff --git a/DESCRIPTION b/DESCRIPTION index 63348fd..f16c679 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -18,8 +18,8 @@ Authors@R: c( )) Description: Functions to query (filter or transform), pivot (convert from array-of-objects to object-of-arrays, for easy import as 'R' - data frame), search, patch (edit), and validate (against 'JSON - Schema') 'JSON' and 'NDJSON' strings, files, or URLs. Query and + data frame), search, patch (edit), and validate (against 'JSON Schema') + 'JSON' and 'NDJSON' strings, files, or URLs. Query and pivot support 'JSONpointer', 'JSONpath' or 'JMESpath' expressions. The implementation uses the 'jsoncons' header-only library; diff --git a/src/readbinbuf.h b/src/readbinbuf.h index 74e0ec8..c678a47 100644 --- a/src/readbinbuf.h +++ b/src/readbinbuf.h @@ -25,7 +25,7 @@ class readbinbuf : public std::streambuf { buf_ = new char[n_bytes_]; } - ~readbinbuf() { delete buf_; } + ~readbinbuf() { delete[] buf_; } int underflow() { if (gptr() == egptr()) { diff --git a/src/rquerypivot.h b/src/rquerypivot.h index c44a8ae..d0e28ff 100644 --- a/src/rquerypivot.h +++ b/src/rquerypivot.h @@ -188,7 +188,7 @@ class rquerypivot // construct array of n_j 'null' to pad each key Json pad(json_array_arg); pad.reserve(n_j); - for (int i = 0; i < n_j; ++i) + for (std::size_t i = 0; i < n_j; ++i) pad.push_back(Json::null()); for (auto& r_key : r_keys) { result_[0][r_key].insert( @@ -202,7 +202,7 @@ class rquerypivot // construct array of n_r 'null' to pad each key Json pad(json_array_arg); pad.reserve(n_r); - for (int i = 0; i < n_r; ++i) + for (std::size_t i = 0; i < n_r; ++i) pad.push_back(Json::null()); for (auto& j_key : j_keys) { result_[0][j_key] = pad;