Commit Graph

10 Commits

Author SHA1 Message Date
Vladimir Krivopalov
fc644a8778 Fix Scylla to compile with older versions of JsonCpp (<= 1.7.0).
Old versions of JsonCpp declare the following typedefs for internally
used aliases:
    typedef long long int Int64;
    typedef unsigned long long int UInt64;

In newer versions (1.8.x), those are declared as:
    typedef int64_t Int64;
    typedef uint64_t UInt64;

Those base types are not identical so in cases when a type has
constructors overloaded only for specific integral types (such as
Json::Value in JsonCpp or data_value in Scylla), an attempt to
pack/unpack an integer from/to a JSON object causes ambiguous calls.

Fixes #3208

Tests: unit {release}.

Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com>
Message-Id: <e9fff9f41e0f34b15afc90b5439be03e4295623e.1524556258.git.vladimir@scylladb.com>
2018-04-24 10:58:38 +03:00
Vladimir Krivopalov
76775ddf26 Use CharReaderBuilder/CharReader and StreamWriterBuilder from JsonCpp.
In version 1.8.3 of JsonCpp shipped with Fedora 27, old FastWriter and
Reader classes from JsonCpp have been deprecated in favour of
newer/better ones: CharReaderBuilder/CharReader and
StreamWriterBuilder/StreamWriter.
This fix uses the new classes where available or resorts to old ones for
older versions of the library.

Fixes #2989

Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com>
2017-12-04 21:03:05 -08:00
Avi Kivity
ebaeefa02b Merge seatar upstream (seastar namespace)
- introcduced "seastarx.hh" header, which does a "using namespace seastar";
 - 'net' namespace conflicts with seastar::net, renamed to 'netw'.
 - 'transport' namespace conflicts with seastar::transport, renamed to
   cql_transport.
 - "logger" global variables now conflict with logger global type, renamed
   to xlogger.
 - other minor changes
2017-05-21 12:26:15 +03:00
Calle Wilund
cb7ee98217 json: Add convinience ability to generate unordered_maps 2017-05-09 13:48:55 +00:00
Pekka Enberg
38a54df863 Fix pre-ScyllaDB copyright statements
People keep tripping over the old copyrights and copy-pasting them to
new files. Search and replace "Cloudius Systems" with "ScyllaDB".

Message-Id: <1460013664-25966-1-git-send-email-penberg@scylladb.com>
2016-04-08 08:12:47 +03:00
Avi Kivity
d5cf0fb2b1 Add license notices 2015-09-20 10:43:39 +03:00
Paweł Dziepak
19d4cd7449 json: do not add a newline at the end of string
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-10 01:29:23 +02:00
Paweł Dziepak
da52b5d5da json: explicitly set Json::Value type to objectValue
Proper Json::Value type would be set implicityl after the first map
element is added. That's not going when the map is empty.

Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-10 01:29:23 +02:00
Paweł Dziepak
8565a22d33 json: fix (de)serialization of map
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-06-30 17:59:42 +02:00
Pekka Enberg
673c0c1759 JSON parsing and formatting helper functions
There's various places in Origin where we convert a Map to a JSON string
and vice versa.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-06-11 13:02:42 +03:00