xml2json-rb 0.3.1-arm-linux

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: b7b2c2b5308ddd27cd2185fdbc52984998ef42e2bbe2e8035badfd90a2c3012d
4
+ data.tar.gz: de0c70c63aa1a577753d03ad1621bbe3dae157cc81fe75f8c885779799b87c94
5
+ SHA512:
6
+ metadata.gz: 28c5ca52624ad1f43a11dac8a4d54e9304b4dadf51979cf9176588fc16762d833ced90033848d9857527eb281dc65837502689d6ca2a84a9998da1539f537c13
7
+ data.tar.gz: ba6598603280fe87554931f1982c84e2e35d9fa72f12a7731b12899c70631b61fcea6ba929dc840eee2cda1d6114a099ffa77df008d2af10d20a1f7f8881fbaf
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Xml2Json
4
+ VERSION = "0.3.1"
5
+ end
data/lib/xml2json.rb ADDED
@@ -0,0 +1,86 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "xml2json/version"
4
+ begin
5
+ require_relative "xml2json/#{RUBY_VERSION[/(\d+\.\d+)/, 1]}/xml2json"
6
+ rescue LoadError
7
+ require_relative "xml2json/xml2json"
8
+ end
9
+
10
+ # @see https://docs.rs/xml2json-rs/1.0.1/xml2json_rs/index.html docs for the wrapped library
11
+ module Xml2Json
12
+ # @!parse [ruby]
13
+ # module Xml
14
+ # module Version
15
+ # XML10 = "1.0"
16
+ # XML11 = "1.1"
17
+ # end
18
+ # module Encoding
19
+ # UTF8 = "UTF-8"
20
+ # end
21
+ #
22
+ # # @param json_s [String, #to_str] JSON string
23
+ # # @param opts [Hash<Symbol, Object>] config params
24
+ # # @note Default values are provided by xml2json-rs
25
+ # # @see https://docs.rs/xml2json-rs/1.0.1/xml2json_rs/struct.XmlConfig.html Docs for xml2json-rs XmlConfig
26
+ # # @option opts [String, #to_str] root_name ("root") Root key name to contain produced JSON object
27
+ # # @option opts [String, #to_str] attrkey ("$") The value of the JSON key used to store XML attributes under
28
+ # # @option opts [String, #to_str] charkey ("_") The value of the JSON key used to store XML character data under
29
+ # # @option opts [nil, "1.0", "1.1", #to_s] version (Xml2Json::Version::XML10) XML Declaration 'version' field,
30
+ # # default if nil
31
+ # # @raise [RuntimeError] if +version.to_s+ returns unsupported string,
32
+ # # for now only +"1.0"+ and +"1.1"+ are supported
33
+ # # @option opts [nil, "UTF-8", #to_s] encoding (nil) XML Declaration 'encoding' field, empty if nil
34
+ # # @raise [RuntimeError] if +encoding.to_s+ returns unsupported string, for now only +"UTF-8"+ is supported
35
+ # # @option opts [bool, nil] standalone (nil) XML Declaration 'standalone' field, empty if nil
36
+ # # @option opts [bool] indent (false) Output XML with line-breaks and indentations
37
+ # # @option opts [String, #to_str] indent_char (" ") Character used for indentation. This option will be ignored
38
+ # # if +indent+ is false
39
+ # # @raise [TypeError] If +indent_char+ is more than one character or can not be encoded as UTF-8
40
+ # # @note It's not enough for the Ruby +indent_char+ string to be UTF-8 encoded, not sure
41
+ # # if that's a bug or a feature of Magnus
42
+ # # @option opts [Integer, #to_int] indent_size (2) Number of characters used for indentation.
43
+ # # This option will be ignored if +indent+ is false
44
+ # # @raise [RangeError] if +indent_size+ cannot be converted into +unsigned long long+
45
+ # # @return [String] XML string
46
+ # # @raise [RuntimeError] if +json_s+ is not valid JSON
47
+ # # @raise [TypeError] if +opts+ contain invalid value
48
+ # def self.build(json_s, opts: nil); end
49
+ # # @option opts [bool] indent (true)
50
+ # # @note Check +Xml2Json::Xml.build+ for other details, the only difference is that +indent+ is true by default
51
+ # # @see .build
52
+ # def self.build_pretty(json_s, opts: nil); end
53
+ # end
54
+ #
55
+ # module Json
56
+ # # @param xml [String, #to_str] XML string
57
+ # # @param opts [Hash<Symbol, Object>] config params
58
+ # # @note Default values are provided by xml2json-rs
59
+ # # @see https://docs.rs/xml2json-rs/1.0.1/xml2json_rs/struct.JsonConfig.html Docs for xml2json-rs JsonConfig
60
+ # # @option opts [String, #to_str] attrkey ("$") Key to outer object containing tag attributes
61
+ # # @option opts [String, #to_str] charkey ("_") Key to store character content under
62
+ # # @option opts [String, #to_str] empty_tag ("") The value of empty nodes
63
+ # # @option opts [bool] indent (false) Output JSON with line-breaks and indentations
64
+ # # @option opts [bool] explicit_root (true) Sets the root node inside the resulting object
65
+ # # @option opts [bool] trim (false) Trim whitespace at the beginning and end of text nodes
66
+ # # @option opts [bool] ignore_attrs (false) Setting this to true will skip adding element attributes
67
+ # # and create text nodes
68
+ # # @option opts [bool] merge_attrs (false) Merge all XML attributes and child elements as properties of
69
+ # # the parent, instead of keying attributes off of the child attribute object. This option will be
70
+ # # ignored if +ignore_attrs+ is true
71
+ # # @option opts [bool] normalize_text (false) Removes whitespace character data in text nodes
72
+ # # @option opts [bool] lowercase_tags (false) Normalize all tags by converting them to lowercase
73
+ # # @option opts [bool] explicit_array (true) Always put the child nodes in an array, otherwise an array is only
74
+ # # created if there is more than one child
75
+ # # @option opts [bool] explicit_charkey (false) Always store character data under +charkey+ even if there are
76
+ # # no other text elements stored inside the tag
77
+ # # @return [String] JSON string
78
+ # # @raise [RuntimeError] if +xml+ is not valid XML
79
+ # # @raise [TypeError] if +opts+ contain invalid value
80
+ # def self.build(xml, opts: nil); end
81
+ # # @option opts [bool] indent (true)
82
+ # # @note Check +Xml2Json::Json.build+ for other details, the only difference is that +indent+ is true by default
83
+ # # @see .build
84
+ # def self.build_pretty(xml, opts: nil); end
85
+ # end
86
+ end
@@ -0,0 +1,6 @@
1
+ module Xml2Json
2
+ module Json
3
+ def self.build: (xml: String, opts: Hash[Symbol, Object]?) -> String
4
+ def self.build_pretty: (xml: String, opts: Hash[Symbol, Object]?) -> String
5
+ end
6
+ end
@@ -0,0 +1,7 @@
1
+ module Xml2Json
2
+ module Xml
3
+ module Encoding
4
+ UTF8: String
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,8 @@
1
+ module Xml2Json
2
+ module Xml
3
+ module Version
4
+ XML10: String
5
+ XML11: String
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,6 @@
1
+ module Xml2Json
2
+ module Xml
3
+ def self.build: (json_s: String, opts: Hash[Symbol, Object]?) -> String
4
+ def self.build_pretty: (json_s: String, opts: Hash[Symbol, Object]?) -> String
5
+ end
6
+ end
data/sig/xml2json.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module Xml2Json
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,217 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: xml2json-rb
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.1
5
+ platform: arm-linux
6
+ authors:
7
+ - uvlad7
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-10-30 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '13.0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '13.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake-compiler
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: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rubocop
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.21'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.21'
69
+ - !ruby/object:Gem::Dependency
70
+ name: pry
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: pry-byebug
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: yard
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rack
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rackup
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: puma
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: toml-rb
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ description: This gem helps to convert xml strings to json and vise versa
168
+ email:
169
+ - uvlad7@gmail.com
170
+ executables: []
171
+ extensions: []
172
+ extra_rdoc_files: []
173
+ files:
174
+ - lib/xml2json.rb
175
+ - lib/xml2json/2.6/xml2json.so
176
+ - lib/xml2json/2.7/xml2json.so
177
+ - lib/xml2json/3.0/xml2json.so
178
+ - lib/xml2json/3.1/xml2json.so
179
+ - lib/xml2json/3.2/xml2json.so
180
+ - lib/xml2json/version.rb
181
+ - sig/xml2_json/json.rbs
182
+ - sig/xml2_json/xml.rbs
183
+ - sig/xml2_json/xml/encoding.rbs
184
+ - sig/xml2_json/xml/version.rbs
185
+ - sig/xml2json.rbs
186
+ homepage: https://github.com/uvlad7/xml2json-rb
187
+ licenses:
188
+ - MIT
189
+ metadata:
190
+ homepage_uri: https://github.com/uvlad7/xml2json-rb
191
+ source_code_uri: https://github.com/uvlad7/xml2json-rb
192
+ changelog_uri: https://github.com/uvlad7/xml2json-rb/blob/main/CHANGELOG.md
193
+ documentation_uri: https://rubydoc.info/gems/xml2json-rb/0.3.1
194
+ rubygems_mfa_required: 'true'
195
+ post_install_message:
196
+ rdoc_options: []
197
+ require_paths:
198
+ - lib
199
+ required_ruby_version: !ruby/object:Gem::Requirement
200
+ requirements:
201
+ - - ">="
202
+ - !ruby/object:Gem::Version
203
+ version: '2.6'
204
+ - - "<"
205
+ - !ruby/object:Gem::Version
206
+ version: 3.3.dev
207
+ required_rubygems_version: !ruby/object:Gem::Requirement
208
+ requirements:
209
+ - - ">="
210
+ - !ruby/object:Gem::Version
211
+ version: 3.3.11
212
+ requirements: []
213
+ rubygems_version: 3.4.4
214
+ signing_key:
215
+ specification_version: 4
216
+ summary: Ruby wrapper for xml2json-rs
217
+ test_files: []