From 6a3f1cc4070e081f0eb8e50f9379953cf95017f8 Mon Sep 17 00:00:00 2001 From: edoust Date: Thu, 13 Jul 2023 12:18:02 +0200 Subject: [PATCH 1/2] Adding support for deserializing arrays of type 'long' --- src/JsonParseNode.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/JsonParseNode.cs b/src/JsonParseNode.cs index 8447411..982d2d1 100644 --- a/src/JsonParseNode.cs +++ b/src/JsonParseNode.cs @@ -223,6 +223,7 @@ public IEnumerable GetCollectionOfObjectValues(ParsableFactory factory) private static readonly Type stringType = typeof(string); private static readonly Type intType = typeof(int?); private static readonly Type floatType = typeof(float?); + private static readonly Type longType = typeof(long?); private static readonly Type doubleType = typeof(double?); private static readonly Type guidType = typeof(Guid?); private static readonly Type dateTimeOffsetType = typeof(DateTimeOffset?); @@ -257,6 +258,8 @@ public IEnumerable GetCollectionOfPrimitiveValues() yield return (T)(object)currentParseNode.GetIntValue()!; else if(genericType == floatType) yield return (T)(object)currentParseNode.GetFloatValue()!; + else if(genericType == longType) + yield return (T)(object)currentParseNode.GetLongValue()!; else if(genericType == doubleType) yield return (T)(object)currentParseNode.GetDoubleValue()!; else if(genericType == guidType) From 274ff6828da8874da7ce888ef18a9fd06a2c318e Mon Sep 17 00:00:00 2001 From: edoust Date: Thu, 13 Jul 2023 18:29:36 +0200 Subject: [PATCH 2/2] Setting version number to 1.0.8, updating the changelog accordingly --- CHANGELOG.md | 8 +++++++- src/Microsoft.Kiota.Serialization.Json.csproj | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a63f27a..199fa99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +## [1.0.8] - 2023-07-14 + +### Changed + +- Fixes deserialization of arrays with item type long + ## [1.0.7] - 2023-06-28 ### Changed @@ -29,7 +35,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed --Fixes a bug where 'new' keyword on derived classes from IParsable is not being respected, returning null properties for json parsed nodes +- Fixes a bug where 'new' keyword on derived classes from IParsable is not being respected, returning null properties for json parsed nodes ### Added diff --git a/src/Microsoft.Kiota.Serialization.Json.csproj b/src/Microsoft.Kiota.Serialization.Json.csproj index 73879b4..961239f 100644 --- a/src/Microsoft.Kiota.Serialization.Json.csproj +++ b/src/Microsoft.Kiota.Serialization.Json.csproj @@ -14,7 +14,7 @@ https://aka.ms/kiota/docs true true - 1.0.7 + 1.0.8 true true