microsoft_kiota_serialization_json 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b7392eb1ed810f1042b32a107273b63178a3accaf2178be70ea58e558f1825e5
4
- data.tar.gz: 1f889c5887c902ed6744e1f142ac995512386154387d8d75a0485a9916ce831a
3
+ metadata.gz: 72c88f393ae1289504b35c5763f3dc90ae97a1cc94f10e75bf9925e4afbac931
4
+ data.tar.gz: c1fa5f7f31c6bca7295d425b0bc40bf4e09493dba9a94b15797f827a89522275
5
5
  SHA512:
6
- metadata.gz: bfaa86848dc0651cced38b7c82647b5c1ce9877fd735a1b8b4c5b7369cced7e01cb61512b59d02431f12197e6818bd8bd72462852bce89afa8357c841eca59cd
7
- data.tar.gz: d100541571f61f4868d3a7fda37f24ad1d70dc45451ecb60fe6e786aea5e6c5ca821bd4c8434c955e5bddf843b09b22dbaf577f9f0fd4329d4a01deb375ff013
6
+ metadata.gz: 45cbfdc4f85bd82c49031a3ccbd175b728942f3c77b375d42743b1a7860035272429fa235d4c0eafb074545710d3166226b885af121db88e242f976cb51caf2e
7
+ data.tar.gz: 891eec4406d87d30eab1337baf7d2c9d65b4be64d790e4f2e49bfaaea796ff6aa4b84eb9e93dd952f7e1054c76532d2d44b58c9194fe5132315ac2b825416128
@@ -19,7 +19,7 @@ jobs:
19
19
  steps:
20
20
  - name: Dependabot metadata
21
21
  id: metadata
22
- uses: dependabot/fetch-metadata@v1.3.6
22
+ uses: dependabot/fetch-metadata@v1.6.0
23
23
  with:
24
24
  github-token: "${{ secrets.GITHUB_TOKEN }}"
25
25
 
data/CHANGELOG.md CHANGED
@@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
 
12
12
  ### Changed
13
13
 
14
+ ## [0.9.1] - 2023-08-18
15
+
16
+ ### Changed
17
+
18
+ - Improve handling of null values (#13)
19
+
14
20
  ## [0.9.0] - 2023-03-28
15
21
 
16
22
  ### Changed
@@ -49,8 +49,10 @@ module MicrosoftKiotaSerializationJson
49
49
  end
50
50
 
51
51
  def get_collection_of_primitive_values(type)
52
- @current_node.map do |x|
53
- current_parse_node = JsonParseNode.new(x)
52
+ @current_node.map do |object|
53
+ next if object.nil?
54
+
55
+ current_parse_node = JsonParseNode.new(object)
54
56
  case type
55
57
  when String
56
58
  current_parse_node.get_string_value
@@ -64,8 +66,8 @@ module MicrosoftKiotaSerializationJson
64
66
  current_parse_node.get_date_time_value
65
67
  when Time
66
68
  current_parse_node.get_time_value
67
- when Date
68
- current_parse_node.get_date_value
69
+ when Date
70
+ current_parse_node.get_date_value
69
71
  when MicrosoftKiotaAbstractions::ISODuration
70
72
  current_parse_node.get_duration_value
71
73
  when UUIDTools::UUID
@@ -80,8 +82,10 @@ module MicrosoftKiotaSerializationJson
80
82
 
81
83
  def get_collection_of_object_values(factory)
82
84
  raise StandardError, 'Factory cannot be null' if factory.nil?
83
- @current_node.map do |x|
84
- current_parse_node = JsonParseNode.new(x)
85
+ @current_node.map do |object|
86
+ next if object.nil?
87
+
88
+ current_parse_node = JsonParseNode.new(object)
85
89
  current_parse_node.get_object_value(factory)
86
90
  end
87
91
  end
@@ -98,6 +102,8 @@ module MicrosoftKiotaSerializationJson
98
102
  def assign_field_values(item)
99
103
  fields = item.get_field_deserializers
100
104
  @current_node.each do |k, v|
105
+ next if v.nil?
106
+
101
107
  deserializer = fields[k]
102
108
  if deserializer
103
109
  deserializer.call(JsonParseNode.new(v))
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MicrosoftKiotaSerializationJson
4
- VERSION = "0.9.0"
4
+ VERSION = "0.9.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: microsoft_kiota_serialization_json
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft Corporation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-28 00:00:00.000000000 Z
11
+ date: 2023-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: microsoft_kiota_abstractions
@@ -148,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  - !ruby/object:Gem::Version
149
149
  version: '0'
150
150
  requirements: []
151
- rubygems_version: 3.4.6
151
+ rubygems_version: 3.4.10
152
152
  signing_key:
153
153
  specification_version: 4
154
154
  summary: Microsoft Kiota Serialization - Ruby serialization for building library agnostic