jsoncons 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/ext/jsoncons/extconf.rb +43 -0
- data/ext/jsoncons/jsoncons.cpp +161 -0
- data/ext/jsoncons/jsoncons.h +10 -0
- data/jsoncons.gemspec +44 -0
- data/lib/jsoncons/jsoncons/examples/input/address-book.json +13 -0
- data/lib/jsoncons/jsoncons/examples/input/books.json +28 -0
- data/lib/jsoncons/jsoncons/examples/input/countries.json +7 -0
- data/lib/jsoncons/jsoncons/examples/input/employees.json +30 -0
- data/lib/jsoncons/jsoncons/examples/input/jsonschema/name.json +15 -0
- data/lib/jsoncons/jsoncons/examples/input/multiple-json-objects.json +3 -0
- data/lib/jsoncons/jsoncons/examples/input/sales.csv +6 -0
- data/lib/jsoncons/jsoncons/examples/input/store.json +28 -0
- data/lib/jsoncons/jsoncons/examples/input/tasks.csv +6 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/allocator_holder.hpp +38 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/basic_json.hpp +5905 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/bigint.hpp +1611 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/byte_string.hpp +820 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/config/binary_config.hpp +226 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/config/compiler_support.hpp +375 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/config/jsoncons_config.hpp +309 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/config/version.hpp +40 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/conv_error.hpp +218 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/decode_json.hpp +209 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/decode_traits.hpp +651 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/detail/endian.hpp +44 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/detail/grisu3.hpp +312 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/detail/optional.hpp +483 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/detail/parse_number.hpp +1133 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/detail/span.hpp +188 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/detail/string_view.hpp +537 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/detail/string_wrapper.hpp +370 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/detail/write_number.hpp +567 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/encode_json.hpp +315 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/encode_traits.hpp +378 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/json.hpp +18 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/json_array.hpp +324 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/json_content_handler.hpp +12 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/json_cursor.hpp +448 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/json_decoder.hpp +420 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/json_encoder.hpp +1587 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/json_error.hpp +156 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/json_exception.hpp +241 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/json_filter.hpp +653 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/json_fwd.hpp +23 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/json_object.hpp +1772 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/json_options.hpp +862 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/json_parser.hpp +2900 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/json_reader.hpp +731 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/json_traits_macros.hpp +1072 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/json_traits_macros_deprecated.hpp +144 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/json_type.hpp +206 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/json_type_traits.hpp +1830 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/json_visitor.hpp +1560 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/json_visitor2.hpp +2079 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/pretty_print.hpp +89 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/ser_context.hpp +62 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/sink.hpp +289 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/source.hpp +777 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/source_adaptor.hpp +148 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/staj2_cursor.hpp +1189 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/staj_cursor.hpp +1254 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/staj_iterator.hpp +449 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/tag_type.hpp +245 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/text_source_adaptor.hpp +144 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/traits_extension.hpp +884 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/typed_array_view.hpp +250 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/unicode_traits.hpp +1330 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/uri.hpp +635 -0
- data/lib/jsoncons/jsoncons/include/jsoncons/value_converter.hpp +340 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/bson/bson.hpp +23 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/bson/bson_cursor.hpp +320 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/bson/bson_decimal128.hpp +865 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/bson/bson_encoder.hpp +585 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/bson/bson_error.hpp +103 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/bson/bson_oid.hpp +245 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/bson/bson_options.hpp +75 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/bson/bson_parser.hpp +645 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/bson/bson_reader.hpp +92 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/bson/bson_type.hpp +44 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/bson/decode_bson.hpp +201 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/bson/encode_bson.hpp +144 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/cbor/cbor.hpp +26 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/cbor/cbor_cursor.hpp +351 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/cbor/cbor_cursor2.hpp +265 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/cbor/cbor_detail.hpp +93 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/cbor/cbor_encoder.hpp +1766 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/cbor/cbor_error.hpp +105 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/cbor/cbor_options.hpp +113 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/cbor/cbor_parser.hpp +1942 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/cbor/cbor_reader.hpp +116 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/cbor/decode_cbor.hpp +203 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/cbor/encode_cbor.hpp +151 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/csv/csv.hpp +17 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/csv/csv_cursor.hpp +358 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/csv/csv_encoder.hpp +954 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/csv/csv_error.hpp +85 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/csv/csv_options.hpp +973 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/csv/csv_parser.hpp +2099 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/csv/csv_reader.hpp +348 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/csv/csv_serializer.hpp +12 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/csv/decode_csv.hpp +208 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/csv/encode_csv.hpp +122 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/jmespath/jmespath.hpp +5215 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/jmespath/jmespath_error.hpp +215 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/jsonpatch/jsonpatch.hpp +579 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/jsonpatch/jsonpatch_error.hpp +121 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/jsonpath/expression.hpp +3329 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/jsonpath/flatten.hpp +432 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/jsonpath/json_location.hpp +445 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/jsonpath/json_query.hpp +115 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/jsonpath/jsonpath.hpp +13 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/jsonpath/jsonpath_error.hpp +240 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/jsonpath/jsonpath_expression.hpp +2612 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/jsonpath/jsonpath_selector.hpp +1322 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/jsonpointer/jsonpointer.hpp +1577 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/jsonpointer/jsonpointer_error.hpp +119 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/jsonschema/format_validator.hpp +968 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/jsonschema/json_validator.hpp +120 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/jsonschema/jsonschema.hpp +13 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/jsonschema/jsonschema_error.hpp +105 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/jsonschema/jsonschema_version.hpp +18 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/jsonschema/keyword_validator.hpp +1745 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/jsonschema/keyword_validator_factory.hpp +556 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/jsonschema/schema_draft7.hpp +198 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/jsonschema/schema_location.hpp +200 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/jsonschema/schema_version.hpp +35 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/jsonschema/subschema.hpp +144 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/mergepatch/mergepatch.hpp +103 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/msgpack/decode_msgpack.hpp +202 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/msgpack/encode_msgpack.hpp +142 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/msgpack/msgpack.hpp +24 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/msgpack/msgpack_cursor.hpp +343 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/msgpack/msgpack_cursor2.hpp +259 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/msgpack/msgpack_encoder.hpp +753 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/msgpack/msgpack_error.hpp +94 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/msgpack/msgpack_options.hpp +74 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/msgpack/msgpack_parser.hpp +748 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/msgpack/msgpack_reader.hpp +116 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/msgpack/msgpack_type.hpp +63 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/ubjson/decode_ubjson.hpp +201 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/ubjson/encode_ubjson.hpp +142 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/ubjson/ubjson.hpp +23 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/ubjson/ubjson_cursor.hpp +307 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/ubjson/ubjson_encoder.hpp +502 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/ubjson/ubjson_error.hpp +100 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/ubjson/ubjson_options.hpp +87 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/ubjson/ubjson_parser.hpp +880 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/ubjson/ubjson_reader.hpp +92 -0
- data/lib/jsoncons/jsoncons/include/jsoncons_ext/ubjson/ubjson_type.hpp +43 -0
- data/lib/jsoncons/version.rb +5 -0
- data/lib/jsoncons.rb +33 -0
- data/test/jsoncons_test.rb +108 -0
- data/test/test_helper.rb +7 -0
- metadata +268 -0
@@ -0,0 +1,92 @@
|
|
1
|
+
// Copyright 2017 Daniel Parker
|
2
|
+
// Distributed under the Boost license, Version 1.0.
|
3
|
+
// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
4
|
+
|
5
|
+
// See https://github.com/danielaparker/jsoncons for latest version
|
6
|
+
|
7
|
+
#ifndef JSONCONS_UBJSON_UBJSON_READER_HPP
|
8
|
+
#define JSONCONS_UBJSON_UBJSON_READER_HPP
|
9
|
+
|
10
|
+
#include <string>
|
11
|
+
#include <memory>
|
12
|
+
#include <utility> // std::move
|
13
|
+
#include <jsoncons/json.hpp>
|
14
|
+
#include <jsoncons/source.hpp>
|
15
|
+
#include <jsoncons/json_visitor.hpp>
|
16
|
+
#include <jsoncons/config/jsoncons_config.hpp>
|
17
|
+
#include <jsoncons_ext/ubjson/ubjson_type.hpp>
|
18
|
+
#include <jsoncons_ext/ubjson/ubjson_error.hpp>
|
19
|
+
#include <jsoncons_ext/ubjson/ubjson_parser.hpp>
|
20
|
+
|
21
|
+
namespace jsoncons { namespace ubjson {
|
22
|
+
|
23
|
+
template <class Source,class Allocator=std::allocator<char>>
|
24
|
+
class basic_ubjson_reader
|
25
|
+
{
|
26
|
+
basic_ubjson_parser<Source,Allocator> parser_;
|
27
|
+
json_visitor& visitor_;
|
28
|
+
public:
|
29
|
+
template <class Sourceable>
|
30
|
+
basic_ubjson_reader(Sourceable&& source,
|
31
|
+
json_visitor& visitor,
|
32
|
+
const Allocator alloc)
|
33
|
+
: basic_ubjson_reader(std::forward<Sourceable>(source),
|
34
|
+
visitor,
|
35
|
+
ubjson_decode_options(),
|
36
|
+
alloc)
|
37
|
+
{
|
38
|
+
}
|
39
|
+
|
40
|
+
template <class Sourceable>
|
41
|
+
basic_ubjson_reader(Sourceable&& source,
|
42
|
+
json_visitor& visitor,
|
43
|
+
const ubjson_decode_options& options = ubjson_decode_options(),
|
44
|
+
const Allocator alloc=Allocator())
|
45
|
+
: parser_(std::forward<Sourceable>(source), options, alloc),
|
46
|
+
visitor_(visitor)
|
47
|
+
{
|
48
|
+
}
|
49
|
+
|
50
|
+
void read()
|
51
|
+
{
|
52
|
+
std::error_code ec;
|
53
|
+
read(ec);
|
54
|
+
if (ec)
|
55
|
+
{
|
56
|
+
JSONCONS_THROW(ser_error(ec,line(),column()));
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
void read(std::error_code& ec)
|
61
|
+
{
|
62
|
+
parser_.reset();
|
63
|
+
parser_.parse(visitor_, ec);
|
64
|
+
if (ec)
|
65
|
+
{
|
66
|
+
return;
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
std::size_t line() const
|
71
|
+
{
|
72
|
+
return parser_.line();
|
73
|
+
}
|
74
|
+
|
75
|
+
std::size_t column() const
|
76
|
+
{
|
77
|
+
return parser_.column();
|
78
|
+
}
|
79
|
+
};
|
80
|
+
|
81
|
+
using ubjson_stream_reader = basic_ubjson_reader<jsoncons::binary_stream_source>;
|
82
|
+
|
83
|
+
using ubjson_bytes_reader = basic_ubjson_reader<jsoncons::bytes_source>;
|
84
|
+
|
85
|
+
#if !defined(JSONCONS_NO_DEPRECATED)
|
86
|
+
JSONCONS_DEPRECATED_MSG("Instead, use ubjson_stream_reader") typedef ubjson_stream_reader ubjson_reader;
|
87
|
+
JSONCONS_DEPRECATED_MSG("Instead, use ubjson_bytes_reader") typedef ubjson_bytes_reader ubjson_buffer_reader;
|
88
|
+
#endif
|
89
|
+
|
90
|
+
}}
|
91
|
+
|
92
|
+
#endif
|
@@ -0,0 +1,43 @@
|
|
1
|
+
// Copyright 2013 Daniel Parker
|
2
|
+
// Distributed under the Boost license, Version 1.0.
|
3
|
+
// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
4
|
+
|
5
|
+
// See https://github.com/danielaparker/jsoncons for latest version
|
6
|
+
|
7
|
+
#ifndef JSONCONS_UBJSON_UBJSON_TYPE_HPP
|
8
|
+
#define JSONCONS_UBJSON_UBJSON_TYPE_HPP
|
9
|
+
|
10
|
+
#include <string>
|
11
|
+
#include <memory>
|
12
|
+
#include <jsoncons/config/jsoncons_config.hpp>
|
13
|
+
|
14
|
+
namespace jsoncons { namespace ubjson {
|
15
|
+
|
16
|
+
namespace ubjson_type
|
17
|
+
{
|
18
|
+
const uint8_t null_type = 'Z';
|
19
|
+
const uint8_t no_op_type = 'N';
|
20
|
+
const uint8_t true_type = 'T';
|
21
|
+
const uint8_t false_type = 'F';
|
22
|
+
const uint8_t int8_type = 'i';
|
23
|
+
const uint8_t uint8_type = 'U';
|
24
|
+
const uint8_t int16_type = 'I';
|
25
|
+
const uint8_t int32_type = 'l';
|
26
|
+
const uint8_t int64_type = 'L';
|
27
|
+
const uint8_t float32_type = 'd';
|
28
|
+
const uint8_t float64_type = 'D';
|
29
|
+
const uint8_t high_precision_number_type = 'H';
|
30
|
+
const uint8_t char_type = 'C';
|
31
|
+
const uint8_t string_type = 'S';
|
32
|
+
const uint8_t start_array_marker = '[';
|
33
|
+
const uint8_t end_array_marker = ']';
|
34
|
+
const uint8_t start_object_marker = '{';
|
35
|
+
const uint8_t end_object_marker = '}';
|
36
|
+
const uint8_t type_marker = '$';
|
37
|
+
const uint8_t count_marker = '#';
|
38
|
+
}
|
39
|
+
|
40
|
+
} // namespace ubjson
|
41
|
+
} // namespace jsoncons
|
42
|
+
|
43
|
+
#endif
|
data/lib/jsoncons.rb
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "jsoncons/version"
|
4
|
+
require_relative "jsoncons/jsoncons"
|
5
|
+
|
6
|
+
module Jsoncons
|
7
|
+
class JsonconsError < StandardError; end
|
8
|
+
|
9
|
+
# A wrapper for [jsoncons](https://github.com/danielaparker/jsoncons)
|
10
|
+
# jsoncons::json class
|
11
|
+
class Json
|
12
|
+
# TODO: Implement in cpp
|
13
|
+
# @raise [RangeError] bignum too big to convert into `unsigned long'
|
14
|
+
# @raise [RangeError] Invalid array subscript
|
15
|
+
# @raise [FloatDomainError] Index on non-array value not supported
|
16
|
+
# @raise [RangeError] Key not found
|
17
|
+
# @raise [RuntimeError] Attempting to access a member of a value that is not an object
|
18
|
+
# @param [String|Symbol|Integer] arg
|
19
|
+
# @return [Jsoncons::Json]
|
20
|
+
def [](arg)
|
21
|
+
case arg
|
22
|
+
when String
|
23
|
+
at_key(arg)
|
24
|
+
when Symbol
|
25
|
+
at_key(arg.to_s)
|
26
|
+
when Integer
|
27
|
+
at_index(arg)
|
28
|
+
else
|
29
|
+
raise TypeError, "wrong argument type #{arg.class} (expected %String|Symbol|Integer)"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,108 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "test_helper"
|
4
|
+
|
5
|
+
Minitest::Reporters.use! [Minitest::Reporters::DefaultReporter.new(color: true)]
|
6
|
+
|
7
|
+
class JsonconsTest < Minitest::Test
|
8
|
+
def test_that_it_has_a_version_number
|
9
|
+
refute_nil ::Jsoncons::VERSION
|
10
|
+
end
|
11
|
+
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
12
|
+
|
13
|
+
def test_single_values_parsing
|
14
|
+
assert_instance_of(Jsoncons::Json, Jsoncons::Json.parse("{}"))
|
15
|
+
assert_raises(RuntimeError) { Jsoncons::Json.parse("") }
|
16
|
+
assert_instance_of(Jsoncons::Json, Jsoncons::Json.parse("false"))
|
17
|
+
assert_instance_of(Jsoncons::Json, Jsoncons::Json.parse("null"))
|
18
|
+
assert_instance_of(Jsoncons::Json, Jsoncons::Json.parse("0.0000000000001"))
|
19
|
+
assert_instance_of(Jsoncons::Json, Jsoncons::Json.parse('"Hello, World"'))
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_simple_object
|
23
|
+
data = Jsoncons::Json.parse('{"first":1,"second":2,"fourth":3,"fifth":4}')
|
24
|
+
assert(!data.empty)
|
25
|
+
assert_equal(4, data.size)
|
26
|
+
assert(data.contains("second"))
|
27
|
+
assert(!data.contains("sixth"))
|
28
|
+
assert_raises(RangeError) { data["sixth"] }
|
29
|
+
assert_instance_of(Jsoncons::Json, data["second"])
|
30
|
+
assert_instance_of(TrueClass, data["second"].is_number)
|
31
|
+
assert_instance_of(FalseClass, data["second"].is_double)
|
32
|
+
data.clear
|
33
|
+
assert(data.empty)
|
34
|
+
assert_equal(0, data.size)
|
35
|
+
end
|
36
|
+
|
37
|
+
def test_values_are_accessible_by_index
|
38
|
+
data = Jsoncons::Json.parse('{"first":1,"second":2,"fourth":3,"fifth":4}')
|
39
|
+
assert_equal(data[1].to_s, "2")
|
40
|
+
end
|
41
|
+
|
42
|
+
def test_ruby_wrappers_for_method_result_are_different_every_time
|
43
|
+
data = Jsoncons::Json.parse('{"first":1,"second":2,"fourth":3,"fifth":4}')
|
44
|
+
assert(data[1] != data["second"])
|
45
|
+
assert(data[1].object_id != data["second"].object_id)
|
46
|
+
# rubocop:disable Lint/BinaryOperatorWithIdenticalOperands
|
47
|
+
assert(data["second"].object_id != data["second"].object_id)
|
48
|
+
assert(data["second"] != data["second"])
|
49
|
+
# rubocop:enable Lint/BinaryOperatorWithIdenticalOperands:
|
50
|
+
end
|
51
|
+
|
52
|
+
def test_original_order_is_kept
|
53
|
+
data = Jsoncons::Json.parse('{
|
54
|
+
"street_number" : "100",
|
55
|
+
"street_name" : "Queen St W",
|
56
|
+
"city" : "Toronto",
|
57
|
+
"country" : "Canada"}')
|
58
|
+
assert_equal('{"street_number":"100","street_name":"Queen St W","city":"Toronto","country":"Canada"}', data.to_s)
|
59
|
+
end
|
60
|
+
|
61
|
+
def test_jsonpath
|
62
|
+
# https://github.com/danielaparker/jsoncons/blob/master/doc/ref/jsonpath/jsonpath.md
|
63
|
+
# https://github.com/danielaparker/jsoncons/blob/master/doc/ref/jsonpath/json_query.md
|
64
|
+
data = load_json("books")
|
65
|
+
res = data.query("$.books[1,1,3].title")
|
66
|
+
assert_instance_of(Jsoncons::Json, res)
|
67
|
+
assert_equal('["The Night Watch","The Night Watch","The Night Watch"]', res.to_s)
|
68
|
+
assert_equal(
|
69
|
+
'["The Night Watch","The Night Watch"]',
|
70
|
+
# yeah, that's strange
|
71
|
+
data.query("$.books[1,1,3].title", Jsoncons::JsonPath::ResultOptions::NoDups.to_i).to_s
|
72
|
+
)
|
73
|
+
paths = data.query("$.books[1,1,3].title", Jsoncons::JsonPath::ResultOptions::Path.to_i)
|
74
|
+
assert_instance_of(Jsoncons::Json, paths)
|
75
|
+
assert_instance_of(Jsoncons::Json, paths[0])
|
76
|
+
assert_equal(%q(["$['books'][1]['title']","$['books'][1]['title']","$['books'][3]['title']"]), paths.to_s)
|
77
|
+
assert_equal(
|
78
|
+
%q(["$['books'][1]['title']","$['books'][3]['title']"]),
|
79
|
+
data.query(
|
80
|
+
"$.books[1,1,3].title",
|
81
|
+
Jsoncons::JsonPath::ResultOptions::Path.to_i | Jsoncons::JsonPath::ResultOptions::NoDups.to_i
|
82
|
+
).to_s
|
83
|
+
)
|
84
|
+
end
|
85
|
+
|
86
|
+
def test_make_expression
|
87
|
+
# https://github.com/danielaparker/jsoncons/blob/master/doc/ref/jsonpath/make_expression.md
|
88
|
+
data = load_json("books")
|
89
|
+
expr = Jsoncons::JsonPath::Expression.make("$.books[?(@.price > avg($.books[*].price))].title")
|
90
|
+
assert_instance_of(Jsoncons::JsonPath::Expression, expr)
|
91
|
+
res = expr.evaluate(data)
|
92
|
+
assert_equal('["The Night Watch"]', res.to_s)
|
93
|
+
expr = Jsoncons::JsonPath::Expression.make("$.books[1,1,3].title")
|
94
|
+
assert_equal('["The Night Watch","The Night Watch","The Night Watch"]', expr.evaluate(data).to_s)
|
95
|
+
assert_equal(
|
96
|
+
%q(["$['books'][1]['title']","$['books'][3]['title']"]),
|
97
|
+
expr.evaluate(
|
98
|
+
data,
|
99
|
+
Jsoncons::JsonPath::ResultOptions::Path.to_i | Jsoncons::JsonPath::ResultOptions::NoDups.to_i
|
100
|
+
).to_s
|
101
|
+
)
|
102
|
+
end
|
103
|
+
# rubocop:enable Metrics/MethodLength, Metrics/AbcSize
|
104
|
+
|
105
|
+
def load_json(name)
|
106
|
+
Jsoncons::Json.parse(File.read("lib/jsoncons/jsoncons/examples/input/#{name}.json"))
|
107
|
+
end
|
108
|
+
end
|
data/test/test_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,268 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jsoncons
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- uvlad7
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-01-06 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rice
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '4.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: get_process_mem
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: pry
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: pry-byebug
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description:
|
70
|
+
email:
|
71
|
+
- uvlad7@gmail.com
|
72
|
+
executables: []
|
73
|
+
extensions:
|
74
|
+
- ext/jsoncons/extconf.rb
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- ext/jsoncons/extconf.rb
|
78
|
+
- ext/jsoncons/jsoncons.cpp
|
79
|
+
- ext/jsoncons/jsoncons.h
|
80
|
+
- jsoncons.gemspec
|
81
|
+
- lib/jsoncons.rb
|
82
|
+
- lib/jsoncons/jsoncons/examples/input/address-book.json
|
83
|
+
- lib/jsoncons/jsoncons/examples/input/books.json
|
84
|
+
- lib/jsoncons/jsoncons/examples/input/countries.json
|
85
|
+
- lib/jsoncons/jsoncons/examples/input/employees.json
|
86
|
+
- lib/jsoncons/jsoncons/examples/input/jsonschema/name.json
|
87
|
+
- lib/jsoncons/jsoncons/examples/input/multiple-json-objects.json
|
88
|
+
- lib/jsoncons/jsoncons/examples/input/sales.csv
|
89
|
+
- lib/jsoncons/jsoncons/examples/input/store.json
|
90
|
+
- lib/jsoncons/jsoncons/examples/input/tasks.csv
|
91
|
+
- lib/jsoncons/jsoncons/include/jsoncons/allocator_holder.hpp
|
92
|
+
- lib/jsoncons/jsoncons/include/jsoncons/basic_json.hpp
|
93
|
+
- lib/jsoncons/jsoncons/include/jsoncons/bigint.hpp
|
94
|
+
- lib/jsoncons/jsoncons/include/jsoncons/byte_string.hpp
|
95
|
+
- lib/jsoncons/jsoncons/include/jsoncons/config/binary_config.hpp
|
96
|
+
- lib/jsoncons/jsoncons/include/jsoncons/config/compiler_support.hpp
|
97
|
+
- lib/jsoncons/jsoncons/include/jsoncons/config/jsoncons_config.hpp
|
98
|
+
- lib/jsoncons/jsoncons/include/jsoncons/config/version.hpp
|
99
|
+
- lib/jsoncons/jsoncons/include/jsoncons/conv_error.hpp
|
100
|
+
- lib/jsoncons/jsoncons/include/jsoncons/decode_json.hpp
|
101
|
+
- lib/jsoncons/jsoncons/include/jsoncons/decode_traits.hpp
|
102
|
+
- lib/jsoncons/jsoncons/include/jsoncons/detail/endian.hpp
|
103
|
+
- lib/jsoncons/jsoncons/include/jsoncons/detail/grisu3.hpp
|
104
|
+
- lib/jsoncons/jsoncons/include/jsoncons/detail/optional.hpp
|
105
|
+
- lib/jsoncons/jsoncons/include/jsoncons/detail/parse_number.hpp
|
106
|
+
- lib/jsoncons/jsoncons/include/jsoncons/detail/span.hpp
|
107
|
+
- lib/jsoncons/jsoncons/include/jsoncons/detail/string_view.hpp
|
108
|
+
- lib/jsoncons/jsoncons/include/jsoncons/detail/string_wrapper.hpp
|
109
|
+
- lib/jsoncons/jsoncons/include/jsoncons/detail/write_number.hpp
|
110
|
+
- lib/jsoncons/jsoncons/include/jsoncons/encode_json.hpp
|
111
|
+
- lib/jsoncons/jsoncons/include/jsoncons/encode_traits.hpp
|
112
|
+
- lib/jsoncons/jsoncons/include/jsoncons/json.hpp
|
113
|
+
- lib/jsoncons/jsoncons/include/jsoncons/json_array.hpp
|
114
|
+
- lib/jsoncons/jsoncons/include/jsoncons/json_content_handler.hpp
|
115
|
+
- lib/jsoncons/jsoncons/include/jsoncons/json_cursor.hpp
|
116
|
+
- lib/jsoncons/jsoncons/include/jsoncons/json_decoder.hpp
|
117
|
+
- lib/jsoncons/jsoncons/include/jsoncons/json_encoder.hpp
|
118
|
+
- lib/jsoncons/jsoncons/include/jsoncons/json_error.hpp
|
119
|
+
- lib/jsoncons/jsoncons/include/jsoncons/json_exception.hpp
|
120
|
+
- lib/jsoncons/jsoncons/include/jsoncons/json_filter.hpp
|
121
|
+
- lib/jsoncons/jsoncons/include/jsoncons/json_fwd.hpp
|
122
|
+
- lib/jsoncons/jsoncons/include/jsoncons/json_object.hpp
|
123
|
+
- lib/jsoncons/jsoncons/include/jsoncons/json_options.hpp
|
124
|
+
- lib/jsoncons/jsoncons/include/jsoncons/json_parser.hpp
|
125
|
+
- lib/jsoncons/jsoncons/include/jsoncons/json_reader.hpp
|
126
|
+
- lib/jsoncons/jsoncons/include/jsoncons/json_traits_macros.hpp
|
127
|
+
- lib/jsoncons/jsoncons/include/jsoncons/json_traits_macros_deprecated.hpp
|
128
|
+
- lib/jsoncons/jsoncons/include/jsoncons/json_type.hpp
|
129
|
+
- lib/jsoncons/jsoncons/include/jsoncons/json_type_traits.hpp
|
130
|
+
- lib/jsoncons/jsoncons/include/jsoncons/json_visitor.hpp
|
131
|
+
- lib/jsoncons/jsoncons/include/jsoncons/json_visitor2.hpp
|
132
|
+
- lib/jsoncons/jsoncons/include/jsoncons/pretty_print.hpp
|
133
|
+
- lib/jsoncons/jsoncons/include/jsoncons/ser_context.hpp
|
134
|
+
- lib/jsoncons/jsoncons/include/jsoncons/sink.hpp
|
135
|
+
- lib/jsoncons/jsoncons/include/jsoncons/source.hpp
|
136
|
+
- lib/jsoncons/jsoncons/include/jsoncons/source_adaptor.hpp
|
137
|
+
- lib/jsoncons/jsoncons/include/jsoncons/staj2_cursor.hpp
|
138
|
+
- lib/jsoncons/jsoncons/include/jsoncons/staj_cursor.hpp
|
139
|
+
- lib/jsoncons/jsoncons/include/jsoncons/staj_iterator.hpp
|
140
|
+
- lib/jsoncons/jsoncons/include/jsoncons/tag_type.hpp
|
141
|
+
- lib/jsoncons/jsoncons/include/jsoncons/text_source_adaptor.hpp
|
142
|
+
- lib/jsoncons/jsoncons/include/jsoncons/traits_extension.hpp
|
143
|
+
- lib/jsoncons/jsoncons/include/jsoncons/typed_array_view.hpp
|
144
|
+
- lib/jsoncons/jsoncons/include/jsoncons/unicode_traits.hpp
|
145
|
+
- lib/jsoncons/jsoncons/include/jsoncons/uri.hpp
|
146
|
+
- lib/jsoncons/jsoncons/include/jsoncons/value_converter.hpp
|
147
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/bson/bson.hpp
|
148
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/bson/bson_cursor.hpp
|
149
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/bson/bson_decimal128.hpp
|
150
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/bson/bson_encoder.hpp
|
151
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/bson/bson_error.hpp
|
152
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/bson/bson_oid.hpp
|
153
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/bson/bson_options.hpp
|
154
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/bson/bson_parser.hpp
|
155
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/bson/bson_reader.hpp
|
156
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/bson/bson_type.hpp
|
157
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/bson/decode_bson.hpp
|
158
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/bson/encode_bson.hpp
|
159
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/cbor/cbor.hpp
|
160
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/cbor/cbor_cursor.hpp
|
161
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/cbor/cbor_cursor2.hpp
|
162
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/cbor/cbor_detail.hpp
|
163
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/cbor/cbor_encoder.hpp
|
164
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/cbor/cbor_error.hpp
|
165
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/cbor/cbor_options.hpp
|
166
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/cbor/cbor_parser.hpp
|
167
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/cbor/cbor_reader.hpp
|
168
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/cbor/decode_cbor.hpp
|
169
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/cbor/encode_cbor.hpp
|
170
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/csv/csv.hpp
|
171
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/csv/csv_cursor.hpp
|
172
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/csv/csv_encoder.hpp
|
173
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/csv/csv_error.hpp
|
174
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/csv/csv_options.hpp
|
175
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/csv/csv_parser.hpp
|
176
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/csv/csv_reader.hpp
|
177
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/csv/csv_serializer.hpp
|
178
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/csv/decode_csv.hpp
|
179
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/csv/encode_csv.hpp
|
180
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/jmespath/jmespath.hpp
|
181
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/jmespath/jmespath_error.hpp
|
182
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/jsonpatch/jsonpatch.hpp
|
183
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/jsonpatch/jsonpatch_error.hpp
|
184
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/jsonpath/expression.hpp
|
185
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/jsonpath/flatten.hpp
|
186
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/jsonpath/json_location.hpp
|
187
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/jsonpath/json_query.hpp
|
188
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/jsonpath/jsonpath.hpp
|
189
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/jsonpath/jsonpath_error.hpp
|
190
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/jsonpath/jsonpath_expression.hpp
|
191
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/jsonpath/jsonpath_selector.hpp
|
192
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/jsonpointer/jsonpointer.hpp
|
193
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/jsonpointer/jsonpointer_error.hpp
|
194
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/jsonschema/format_validator.hpp
|
195
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/jsonschema/json_validator.hpp
|
196
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/jsonschema/jsonschema.hpp
|
197
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/jsonschema/jsonschema_error.hpp
|
198
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/jsonschema/jsonschema_version.hpp
|
199
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/jsonschema/keyword_validator.hpp
|
200
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/jsonschema/keyword_validator_factory.hpp
|
201
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/jsonschema/schema_draft7.hpp
|
202
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/jsonschema/schema_location.hpp
|
203
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/jsonschema/schema_version.hpp
|
204
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/jsonschema/subschema.hpp
|
205
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/mergepatch/mergepatch.hpp
|
206
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/msgpack/decode_msgpack.hpp
|
207
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/msgpack/encode_msgpack.hpp
|
208
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/msgpack/msgpack.hpp
|
209
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/msgpack/msgpack_cursor.hpp
|
210
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/msgpack/msgpack_cursor2.hpp
|
211
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/msgpack/msgpack_encoder.hpp
|
212
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/msgpack/msgpack_error.hpp
|
213
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/msgpack/msgpack_options.hpp
|
214
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/msgpack/msgpack_parser.hpp
|
215
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/msgpack/msgpack_reader.hpp
|
216
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/msgpack/msgpack_type.hpp
|
217
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/ubjson/decode_ubjson.hpp
|
218
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/ubjson/encode_ubjson.hpp
|
219
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/ubjson/ubjson.hpp
|
220
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/ubjson/ubjson_cursor.hpp
|
221
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/ubjson/ubjson_encoder.hpp
|
222
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/ubjson/ubjson_error.hpp
|
223
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/ubjson/ubjson_options.hpp
|
224
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/ubjson/ubjson_parser.hpp
|
225
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/ubjson/ubjson_reader.hpp
|
226
|
+
- lib/jsoncons/jsoncons/include/jsoncons_ext/ubjson/ubjson_type.hpp
|
227
|
+
- lib/jsoncons/version.rb
|
228
|
+
- test/jsoncons_test.rb
|
229
|
+
- test/test_helper.rb
|
230
|
+
homepage: https://github.com/uvlad7/ruby-jsoncons
|
231
|
+
licenses:
|
232
|
+
- MIT
|
233
|
+
metadata:
|
234
|
+
allowed_push_host: https://rubygems.org
|
235
|
+
homepage_uri: https://github.com/uvlad7/ruby-jsoncons
|
236
|
+
source_code_uri: https://github.com/uvlad7/ruby-jsoncons
|
237
|
+
changelog_uri: https://github.com/uvlad7/ruby-jsoncons
|
238
|
+
post_install_message:
|
239
|
+
rdoc_options: []
|
240
|
+
require_paths:
|
241
|
+
- lib
|
242
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
243
|
+
requirements:
|
244
|
+
- - ">="
|
245
|
+
- !ruby/object:Gem::Version
|
246
|
+
version: 2.6.0
|
247
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
248
|
+
requirements:
|
249
|
+
- - ">="
|
250
|
+
- !ruby/object:Gem::Version
|
251
|
+
version: '0'
|
252
|
+
requirements: []
|
253
|
+
rubygems_version: 3.3.5
|
254
|
+
signing_key:
|
255
|
+
specification_version: 4
|
256
|
+
summary: Ruby wrapper for https://github.com/danielaparker/jsoncons
|
257
|
+
test_files:
|
258
|
+
- lib/jsoncons/jsoncons/examples/input/sales.csv
|
259
|
+
- lib/jsoncons/jsoncons/examples/input/store.json
|
260
|
+
- lib/jsoncons/jsoncons/examples/input/address-book.json
|
261
|
+
- lib/jsoncons/jsoncons/examples/input/jsonschema/name.json
|
262
|
+
- lib/jsoncons/jsoncons/examples/input/multiple-json-objects.json
|
263
|
+
- lib/jsoncons/jsoncons/examples/input/tasks.csv
|
264
|
+
- lib/jsoncons/jsoncons/examples/input/countries.json
|
265
|
+
- lib/jsoncons/jsoncons/examples/input/books.json
|
266
|
+
- lib/jsoncons/jsoncons/examples/input/employees.json
|
267
|
+
- test/jsoncons_test.rb
|
268
|
+
- test/test_helper.rb
|