microsoft_kiota_serialization_json 0.19.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f4c78759c2b5ddda66461cc4d08cf5eb57ceed877a2e5f04e2876f36fafe13e6
|
|
4
|
+
data.tar.gz: c55852e6f0ef2cc369647881610f9eebcb94acc3295784f01b7334e6c05af187
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2e2d4b6678b50247a0098226cacc7693c4e6a26751cb8b5535ed34e8beb09c079a51bfc82fd6521953497c6c6131fd3d6bd71a23e335f518a6d165893e5da24a
|
|
7
|
+
data.tar.gz: 977f31b44c36c56b196d14fd80a2dcc2555c04cbe1a6ef7d7cfa44a701f7aa1e84401893b0d8d9dc78d3f3700c79b303f86e09f84e00fd01f1a5c0793333c260
|
|
@@ -108,18 +108,19 @@ module MicrosoftKiotaSerializationJson
|
|
|
108
108
|
end
|
|
109
109
|
|
|
110
110
|
def assign_field_values(item)
|
|
111
|
+
return unless @current_node.is_a?(Hash)
|
|
112
|
+
|
|
111
113
|
fields = item.get_field_deserializers
|
|
112
114
|
@current_node.each do |k, v|
|
|
113
115
|
next if v.nil?
|
|
114
116
|
|
|
115
117
|
deserializer = fields[k]
|
|
116
|
-
if deserializer
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
end
|
|
118
|
+
next deserializer.call(JsonParseNode.new(v)) if deserializer
|
|
119
|
+
|
|
120
|
+
additional_data = item.respond_to?(:additional_data) ? item.additional_data : nil
|
|
121
|
+
next if additional_data.nil?
|
|
122
|
+
|
|
123
|
+
additional_data[k] = v
|
|
123
124
|
end
|
|
124
125
|
end
|
|
125
126
|
|
|
@@ -33,6 +33,7 @@ module MicrosoftKiotaSerializationJson
|
|
|
33
33
|
def write_string_value(key, value)
|
|
34
34
|
raise StandardError, 'no key or value included in write_string_value(key, value)' if key.nil? && value.nil?
|
|
35
35
|
return set_root_value(value) if key.nil?
|
|
36
|
+
return if value.nil?
|
|
36
37
|
|
|
37
38
|
@writer[key] = value
|
|
38
39
|
end
|
|
@@ -40,6 +41,7 @@ module MicrosoftKiotaSerializationJson
|
|
|
40
41
|
def write_boolean_value(key, value)
|
|
41
42
|
raise StandardError, 'no key or value included in write_boolean_value(key, value)' if key.nil? && value.nil?
|
|
42
43
|
return set_root_value(value) if key.nil?
|
|
44
|
+
return if value.nil?
|
|
43
45
|
|
|
44
46
|
@writer[key] = value
|
|
45
47
|
end
|
|
@@ -47,6 +49,7 @@ module MicrosoftKiotaSerializationJson
|
|
|
47
49
|
def write_number_value(key, value)
|
|
48
50
|
raise StandardError, 'no key or value included in write_number_value(key, value)' if key.nil? && value.nil?
|
|
49
51
|
return set_root_value(value) if key.nil?
|
|
52
|
+
return if value.nil?
|
|
50
53
|
|
|
51
54
|
@writer[key] = value
|
|
52
55
|
end
|
|
@@ -54,6 +57,7 @@ module MicrosoftKiotaSerializationJson
|
|
|
54
57
|
def write_float_value(key, value)
|
|
55
58
|
raise StandardError, 'no key or value included in write_float_value(key, value)' if key.nil? && value.nil?
|
|
56
59
|
return set_root_value(value) if key.nil?
|
|
60
|
+
return if value.nil?
|
|
57
61
|
|
|
58
62
|
@writer[key] = value
|
|
59
63
|
end
|
|
@@ -61,36 +65,41 @@ module MicrosoftKiotaSerializationJson
|
|
|
61
65
|
def write_guid_value(key, value)
|
|
62
66
|
raise StandardError, 'no key or value included in write_guid_value(key, value)' if !key && !value
|
|
63
67
|
return value.to_s unless key
|
|
68
|
+
return if value.nil?
|
|
64
69
|
|
|
65
|
-
@writer[key] =
|
|
70
|
+
@writer[key] = value.to_s
|
|
66
71
|
end
|
|
67
72
|
|
|
68
73
|
def write_date_value(key, value)
|
|
69
74
|
raise StandardError, 'no key or value included in write_date_value(key, value)' if !key && !value
|
|
70
75
|
return value.strftime('%Y-%m-%d') unless key
|
|
76
|
+
return if value.nil?
|
|
71
77
|
|
|
72
|
-
@writer[key] =
|
|
78
|
+
@writer[key] = value.strftime('%Y-%m-%d')
|
|
73
79
|
end
|
|
74
80
|
|
|
75
81
|
def write_time_value(key, value)
|
|
76
82
|
raise StandardError, 'no key or value included in write_time_value(key, value)' if !key && !value
|
|
77
83
|
return value.strftime('%H:%M:%S%Z') unless key
|
|
84
|
+
return if value.nil?
|
|
78
85
|
|
|
79
|
-
@writer[key] =
|
|
86
|
+
@writer[key] = value.strftime('%H:%M:%S%Z')
|
|
80
87
|
end
|
|
81
88
|
|
|
82
89
|
def write_date_time_value(key, value)
|
|
83
90
|
raise StandardError, 'no key or value included in write_date_time_value(key, value)' if !key && !value
|
|
84
91
|
return value.strftime('%Y-%m-%dT%H:%M:%S%Z') unless key
|
|
92
|
+
return if value.nil?
|
|
85
93
|
|
|
86
|
-
@writer[key] =
|
|
94
|
+
@writer[key] = value.strftime('%Y-%m-%dT%H:%M:%S%Z')
|
|
87
95
|
end
|
|
88
96
|
|
|
89
97
|
def write_duration_value(key, value)
|
|
90
98
|
raise StandardError, 'no key or value included in write_duration_value(key, value)' if !key && !value
|
|
91
99
|
return value.string unless key
|
|
100
|
+
return if value.nil?
|
|
92
101
|
|
|
93
|
-
@writer[key] =
|
|
102
|
+
@writer[key] = value.string
|
|
94
103
|
end
|
|
95
104
|
|
|
96
105
|
def write_collection_of_primitive_values(key, values)
|
|
@@ -124,6 +133,9 @@ module MicrosoftKiotaSerializationJson
|
|
|
124
133
|
end
|
|
125
134
|
|
|
126
135
|
def write_enum_value(key, values)
|
|
136
|
+
raise StandardError, 'no key or value included in write_enum_value(key, values)' if key.nil? && values.nil?
|
|
137
|
+
return if values.nil?
|
|
138
|
+
|
|
127
139
|
write_string_value(key, values.to_s)
|
|
128
140
|
end
|
|
129
141
|
|
|
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
|
27
27
|
spec.bindir = 'bin'
|
|
28
28
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
29
29
|
spec.require_paths = ['lib']
|
|
30
|
-
spec.add_dependency 'json', '>= 2.6.3', '<
|
|
30
|
+
spec.add_dependency 'json', '>= 2.6.3', '< 3.1.0'
|
|
31
31
|
spec.add_dependency 'microsoft_kiota_abstractions', MicrosoftKiotaSerializationJson::VERSION
|
|
32
32
|
spec.add_dependency 'uuidtools', '>= 2.2', '< 3.1'
|
|
33
33
|
spec.add_development_dependency 'rake', '~> 13.0'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: microsoft_kiota_serialization_json
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.21.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Microsoft Corporation
|
|
@@ -18,7 +18,7 @@ dependencies:
|
|
|
18
18
|
version: 2.6.3
|
|
19
19
|
- - "<"
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
|
-
version:
|
|
21
|
+
version: 3.1.0
|
|
22
22
|
type: :runtime
|
|
23
23
|
prerelease: false
|
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -28,21 +28,21 @@ dependencies:
|
|
|
28
28
|
version: 2.6.3
|
|
29
29
|
- - "<"
|
|
30
30
|
- !ruby/object:Gem::Version
|
|
31
|
-
version:
|
|
31
|
+
version: 3.1.0
|
|
32
32
|
- !ruby/object:Gem::Dependency
|
|
33
33
|
name: microsoft_kiota_abstractions
|
|
34
34
|
requirement: !ruby/object:Gem::Requirement
|
|
35
35
|
requirements:
|
|
36
36
|
- - '='
|
|
37
37
|
- !ruby/object:Gem::Version
|
|
38
|
-
version: 0.
|
|
38
|
+
version: 0.21.0
|
|
39
39
|
type: :runtime
|
|
40
40
|
prerelease: false
|
|
41
41
|
version_requirements: !ruby/object:Gem::Requirement
|
|
42
42
|
requirements:
|
|
43
43
|
- - '='
|
|
44
44
|
- !ruby/object:Gem::Version
|
|
45
|
-
version: 0.
|
|
45
|
+
version: 0.21.0
|
|
46
46
|
- !ruby/object:Gem::Dependency
|
|
47
47
|
name: uuidtools
|
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|