Skip to content

Commit b0b0283

Browse files
committed
fix(Newtonsoft): update to new LBT.Newtonsoft, remove System.Text.Json
1 parent 06073b1 commit b0b0283

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+25616
-8290
lines changed

.openapi-docs/all_combined.json

Lines changed: 17184 additions & 0 deletions
Large diffs are not rendered by default.

.openapi-docs/model_inheritance.json

Lines changed: 7879 additions & 7879 deletions
Large diffs are not rendered by default.

src/CSharpSDK/DragonflySchema.csproj

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<TargetFrameworks>netstandard2.0</TargetFrameworks>
55
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
6-
<Version>1.1501.5</Version>
6+
<Version>1.1501.6</Version>
77
<Authors>Ladybug Tools</Authors>
88
<Description>This is the .Net version of Dragonfly Schema</Description>
99
<Copyright>Copyright © 2025 Ladybug Tools LLC</Copyright>
@@ -21,12 +21,9 @@
2121
</PropertyGroup>
2222

2323
<ItemGroup>
24-
<PackageReference Include="LBT.Newtonsoft.Json" Version="12.0.3.23910">
25-
<Aliases>LBTNewtonSoft</Aliases>
26-
</PackageReference>
24+
<PackageReference Include="LBT.Newtonsoft.Json" Version="13.0.3" />
2725
<PackageReference Include="HoneybeeSchema" Version="1.5901.0" />
2826
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
29-
<PackageReference Include="System.Text.Json" Version="[6.0.10,)" />
3027
</ItemGroup>
3128

3229
</Project>

src/CSharpSDK/Model/Building.cs

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* Contact: info@ladybug.tools
55
*/
66

7-
extern alias LBTNewtonSoft;
87
//using System;
98
using System.Linq;
109
using System.IO;
@@ -14,8 +13,8 @@
1413
using System.Collections.Generic;
1514
using System.Collections.ObjectModel;
1615
using System.Runtime.Serialization;
17-
using LBTNewtonSoft::Newtonsoft.Json;
18-
using LBTNewtonSoft::Newtonsoft.Json.Converters;
16+
using LBT.Newtonsoft.Json;
17+
using LBT.Newtonsoft.Json.Converters;
1918
using System.ComponentModel.DataAnnotations;
2019
using HoneybeeSchema;
2120

@@ -32,8 +31,8 @@ public partial class Building : IDdBaseModel, System.IEquatable<Building>
3231
/// <summary>
3332
/// Initializes a new instance of the <see cref="Building" /> class.
3433
/// </summary>
35-
[LBTNewtonSoft.Newtonsoft.Json.JsonConstructorAttribute]
36-
[System.Text.Json.Serialization.JsonConstructor]
34+
[LBT.Newtonsoft.Json.JsonConstructorAttribute]
35+
// [System.Text.Json.Serialization.JsonConstructor] // for future switching to System.Text.Json
3736
protected Building()
3837
{
3938
// Set readonly properties with defaultValue
@@ -75,31 +74,37 @@ public Building
7574
[Summary(@"Extension properties for particular simulation engines (Radiance, EnergyPlus).")]
7675
[Required]
7776
[DataMember(Name = "properties", IsRequired = true)] // For Newtonsoft.Json
78-
[System.Text.Json.Serialization.JsonPropertyName("properties")] // For System.Text.Json
77+
// [System.Text.Json.Serialization.JsonPropertyName("properties")] // For System.Text.Json
7978
public BuildingPropertiesAbridged Properties { get; set; }
8079

8180
/// <summary>
8281
/// An array of unique dragonfly Story objects that together form the entire building. Stories should generally be ordered from lowest floor to highest floor, though this is not required. Note that, if a given Story is repeated several times over the height of the building and this is represented by the multiplier, the unique story included in this list should be the first (lowest) story of the repeated floors.
8382
/// </summary>
8483
[Summary(@"An array of unique dragonfly Story objects that together form the entire building. Stories should generally be ordered from lowest floor to highest floor, though this is not required. Note that, if a given Story is repeated several times over the height of the building and this is represented by the multiplier, the unique story included in this list should be the first (lowest) story of the repeated floors.")]
8584
[DataMember(Name = "unique_stories")] // For Newtonsoft.Json
86-
[System.Text.Json.Serialization.JsonPropertyName("unique_stories")] // For System.Text.Json
85+
// [System.Text.Json.Serialization.JsonPropertyName("unique_stories")] // For System.Text.Json
86+
[LBT.Newtonsoft.Json.JsonProperty(NullValueHandling = NullValueHandling.Ignore)] // For Newtonsoft.Json
87+
// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] // For System.Text.Json
8788
public List<Story> UniqueStories { get; set; }
8889

8990
/// <summary>
9091
/// An optional array of 3D Honeybee Room objects for additional Rooms that are a part of the Building but are not represented within the unique_stories. This is useful when there are parts of the Building geometry that cannot easily be represented with the extruded floor plate and sloped roof assumptions that underlie Dragonfly Room2Ds and RoofSpecification. Cases where this input is most useful include sloped walls and certain types of domed roofs that become tedious to implement with RoofSpecification. Matching the Honeybee Room.story property to the Dragonfly Story.display_name of an object within the unique_stories will effectively place the Honeybee Room on that Story for the purposes of floor_area, exterior_wall_area, etc. However, note that the Honeybee Room.multiplier property takes precedence over whatever multiplier is assigned to the Dragonfly Story that the Room.story may reference. (Default: None).
9192
/// </summary>
9293
[Summary(@"An optional array of 3D Honeybee Room objects for additional Rooms that are a part of the Building but are not represented within the unique_stories. This is useful when there are parts of the Building geometry that cannot easily be represented with the extruded floor plate and sloped roof assumptions that underlie Dragonfly Room2Ds and RoofSpecification. Cases where this input is most useful include sloped walls and certain types of domed roofs that become tedious to implement with RoofSpecification. Matching the Honeybee Room.story property to the Dragonfly Story.display_name of an object within the unique_stories will effectively place the Honeybee Room on that Story for the purposes of floor_area, exterior_wall_area, etc. However, note that the Honeybee Room.multiplier property takes precedence over whatever multiplier is assigned to the Dragonfly Story that the Room.story may reference. (Default: None).")]
9394
[DataMember(Name = "room_3ds")] // For Newtonsoft.Json
94-
[System.Text.Json.Serialization.JsonPropertyName("room_3ds")] // For System.Text.Json
95+
// [System.Text.Json.Serialization.JsonPropertyName("room_3ds")] // For System.Text.Json
96+
[LBT.Newtonsoft.Json.JsonProperty(NullValueHandling = NullValueHandling.Ignore)] // For Newtonsoft.Json
97+
// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] // For System.Text.Json
9598
public List<Room> Room3ds { get; set; }
9699

97100
/// <summary>
98101
/// An optional RoofSpecification object that provides an alternative way to describe roof geometry over rooms (instead of specifying roofs on each story). If trying to decide between the two, specifying geometry on each story is closer to how dragonfly natively works with roof geometry as it relates to rooms. However, when it is unknown which roof geometries correspond to which stories, this Building-level attribute may be used and each roof geometry will automatically be added to the best Story in the Building upon serialization to Python. This automatic assignment will happen by checking for overlaps between the Story Room2Ds and the Roof geometry in plan. When a given roof geometry overlaps with several Stories, the top-most Story will get the roof geometry assigned to it unless this top Story has a floor_height above the roof geometry, in which case the next highest story will be checked until a compatible one is found.
99102
/// </summary>
100103
[Summary(@"An optional RoofSpecification object that provides an alternative way to describe roof geometry over rooms (instead of specifying roofs on each story). If trying to decide between the two, specifying geometry on each story is closer to how dragonfly natively works with roof geometry as it relates to rooms. However, when it is unknown which roof geometries correspond to which stories, this Building-level attribute may be used and each roof geometry will automatically be added to the best Story in the Building upon serialization to Python. This automatic assignment will happen by checking for overlaps between the Story Room2Ds and the Roof geometry in plan. When a given roof geometry overlaps with several Stories, the top-most Story will get the roof geometry assigned to it unless this top Story has a floor_height above the roof geometry, in which case the next highest story will be checked until a compatible one is found.")]
101104
[DataMember(Name = "roof")] // For Newtonsoft.Json
102-
[System.Text.Json.Serialization.JsonPropertyName("roof")] // For System.Text.Json
105+
// [System.Text.Json.Serialization.JsonPropertyName("roof")] // For System.Text.Json
106+
[LBT.Newtonsoft.Json.JsonProperty(NullValueHandling = NullValueHandling.Ignore)] // For Newtonsoft.Json
107+
// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] // For System.Text.Json
103108
public RoofSpecification Roof { get; set; }
104109

105110

src/CSharpSDK/Model/BuildingEnergyPropertiesAbridged.cs

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* Contact: info@ladybug.tools
55
*/
66

7-
extern alias LBTNewtonSoft;
87
//using System;
98
using System.Linq;
109
using System.IO;
@@ -14,8 +13,8 @@
1413
using System.Collections.Generic;
1514
using System.Collections.ObjectModel;
1615
using System.Runtime.Serialization;
17-
using LBTNewtonSoft::Newtonsoft.Json;
18-
using LBTNewtonSoft::Newtonsoft.Json.Converters;
16+
using LBT.Newtonsoft.Json;
17+
using LBT.Newtonsoft.Json.Converters;
1918
using System.ComponentModel.DataAnnotations;
2019
using HoneybeeSchema;
2120

@@ -32,8 +31,8 @@ public partial class BuildingEnergyPropertiesAbridged : OpenAPIGenBaseModel, Sys
3231
/// <summary>
3332
/// Initializes a new instance of the <see cref="BuildingEnergyPropertiesAbridged" /> class.
3433
/// </summary>
35-
[LBTNewtonSoft.Newtonsoft.Json.JsonConstructorAttribute]
36-
[System.Text.Json.Serialization.JsonConstructor]
34+
[LBT.Newtonsoft.Json.JsonConstructorAttribute]
35+
// [System.Text.Json.Serialization.JsonConstructor] // for future switching to System.Text.Json
3736
protected BuildingEnergyPropertiesAbridged()
3837
{
3938
// Set readonly properties with defaultValue
@@ -71,7 +70,9 @@ public BuildingEnergyPropertiesAbridged
7170
[MinLength(1)]
7271
[MaxLength(100)]
7372
[DataMember(Name = "construction_set")] // For Newtonsoft.Json
74-
[System.Text.Json.Serialization.JsonPropertyName("construction_set")] // For System.Text.Json
73+
// [System.Text.Json.Serialization.JsonPropertyName("construction_set")] // For System.Text.Json
74+
[LBT.Newtonsoft.Json.JsonProperty(NullValueHandling = NullValueHandling.Ignore)] // For Newtonsoft.Json
75+
// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] // For System.Text.Json
7576
public string ConstructionSet { get; set; }
7677

7778
/// <summary>
@@ -81,7 +82,9 @@ public BuildingEnergyPropertiesAbridged
8182
[MinLength(1)]
8283
[MaxLength(100)]
8384
[DataMember(Name = "ceiling_plenum_construction")] // For Newtonsoft.Json
84-
[System.Text.Json.Serialization.JsonPropertyName("ceiling_plenum_construction")] // For System.Text.Json
85+
// [System.Text.Json.Serialization.JsonPropertyName("ceiling_plenum_construction")] // For System.Text.Json
86+
[LBT.Newtonsoft.Json.JsonProperty(NullValueHandling = NullValueHandling.Ignore)] // For Newtonsoft.Json
87+
// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] // For System.Text.Json
8588
public string CeilingPlenumConstruction { get; set; }
8689

8790
/// <summary>
@@ -91,7 +94,9 @@ public BuildingEnergyPropertiesAbridged
9194
[MinLength(1)]
9295
[MaxLength(100)]
9396
[DataMember(Name = "floor_plenum_construction")] // For Newtonsoft.Json
94-
[System.Text.Json.Serialization.JsonPropertyName("floor_plenum_construction")] // For System.Text.Json
97+
// [System.Text.Json.Serialization.JsonPropertyName("floor_plenum_construction")] // For System.Text.Json
98+
[LBT.Newtonsoft.Json.JsonProperty(NullValueHandling = NullValueHandling.Ignore)] // For Newtonsoft.Json
99+
// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] // For System.Text.Json
95100
public string FloorPlenumConstruction { get; set; }
96101

97102

src/CSharpSDK/Model/BuildingPropertiesAbridged.cs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* Contact: info@ladybug.tools
55
*/
66

7-
extern alias LBTNewtonSoft;
87
//using System;
98
using System.Linq;
109
using System.IO;
@@ -14,8 +13,8 @@
1413
using System.Collections.Generic;
1514
using System.Collections.ObjectModel;
1615
using System.Runtime.Serialization;
17-
using LBTNewtonSoft::Newtonsoft.Json;
18-
using LBTNewtonSoft::Newtonsoft.Json.Converters;
16+
using LBT.Newtonsoft.Json;
17+
using LBT.Newtonsoft.Json.Converters;
1918
using System.ComponentModel.DataAnnotations;
2019
using HoneybeeSchema;
2120

@@ -29,8 +28,8 @@ public partial class BuildingPropertiesAbridged : OpenAPIGenBaseModel, System.IE
2928
/// <summary>
3029
/// Initializes a new instance of the <see cref="BuildingPropertiesAbridged" /> class.
3130
/// </summary>
32-
[LBTNewtonSoft.Newtonsoft.Json.JsonConstructorAttribute]
33-
[System.Text.Json.Serialization.JsonConstructor]
31+
[LBT.Newtonsoft.Json.JsonConstructorAttribute]
32+
// [System.Text.Json.Serialization.JsonConstructor] // for future switching to System.Text.Json
3433
protected BuildingPropertiesAbridged()
3534
{
3635
// Set readonly properties with defaultValue
@@ -64,15 +63,19 @@ public BuildingPropertiesAbridged
6463
/// </summary>
6564
[Summary(@"Energy")]
6665
[DataMember(Name = "energy")] // For Newtonsoft.Json
67-
[System.Text.Json.Serialization.JsonPropertyName("energy")] // For System.Text.Json
66+
// [System.Text.Json.Serialization.JsonPropertyName("energy")] // For System.Text.Json
67+
[LBT.Newtonsoft.Json.JsonProperty(NullValueHandling = NullValueHandling.Ignore)] // For Newtonsoft.Json
68+
// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] // For System.Text.Json
6869
public BuildingEnergyPropertiesAbridged Energy { get; set; }
6970

7071
/// <summary>
7172
/// Radiance
7273
/// </summary>
7374
[Summary(@"Radiance")]
7475
[DataMember(Name = "radiance")] // For Newtonsoft.Json
75-
[System.Text.Json.Serialization.JsonPropertyName("radiance")] // For System.Text.Json
76+
// [System.Text.Json.Serialization.JsonPropertyName("radiance")] // For System.Text.Json
77+
[LBT.Newtonsoft.Json.JsonProperty(NullValueHandling = NullValueHandling.Ignore)] // For Newtonsoft.Json
78+
// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] // For System.Text.Json
7679
public BuildingRadiancePropertiesAbridged Radiance { get; set; }
7780

7881

src/CSharpSDK/Model/BuildingRadiancePropertiesAbridged.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* Contact: info@ladybug.tools
55
*/
66

7-
extern alias LBTNewtonSoft;
87
//using System;
98
using System.Linq;
109
using System.IO;
@@ -14,8 +13,8 @@
1413
using System.Collections.Generic;
1514
using System.Collections.ObjectModel;
1615
using System.Runtime.Serialization;
17-
using LBTNewtonSoft::Newtonsoft.Json;
18-
using LBTNewtonSoft::Newtonsoft.Json.Converters;
16+
using LBT.Newtonsoft.Json;
17+
using LBT.Newtonsoft.Json.Converters;
1918
using System.ComponentModel.DataAnnotations;
2019
using HoneybeeSchema;
2120

@@ -32,8 +31,8 @@ public partial class BuildingRadiancePropertiesAbridged : OpenAPIGenBaseModel, S
3231
/// <summary>
3332
/// Initializes a new instance of the <see cref="BuildingRadiancePropertiesAbridged" /> class.
3433
/// </summary>
35-
[LBTNewtonSoft.Newtonsoft.Json.JsonConstructorAttribute]
36-
[System.Text.Json.Serialization.JsonConstructor]
34+
[LBT.Newtonsoft.Json.JsonConstructorAttribute]
35+
// [System.Text.Json.Serialization.JsonConstructor] // for future switching to System.Text.Json
3736
protected BuildingRadiancePropertiesAbridged()
3837
{
3938
// Set readonly properties with defaultValue
@@ -65,7 +64,9 @@ public BuildingRadiancePropertiesAbridged
6564
/// </summary>
6665
[Summary(@"Name of a ModifierSet to specify all modifiers for the Building. If None, the Model global_modifier_set will be used.")]
6766
[DataMember(Name = "modifier_set")] // For Newtonsoft.Json
68-
[System.Text.Json.Serialization.JsonPropertyName("modifier_set")] // For System.Text.Json
67+
// [System.Text.Json.Serialization.JsonPropertyName("modifier_set")] // For System.Text.Json
68+
[LBT.Newtonsoft.Json.JsonProperty(NullValueHandling = NullValueHandling.Ignore)] // For Newtonsoft.Json
69+
// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] // For System.Text.Json
6970
public string ModifierSet { get; set; }
7071

7172

src/CSharpSDK/Model/ContextShade.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* Contact: info@ladybug.tools
55
*/
66

7-
extern alias LBTNewtonSoft;
87
//using System;
98
using System.Linq;
109
using System.IO;
@@ -14,8 +13,8 @@
1413
using System.Collections.Generic;
1514
using System.Collections.ObjectModel;
1615
using System.Runtime.Serialization;
17-
using LBTNewtonSoft::Newtonsoft.Json;
18-
using LBTNewtonSoft::Newtonsoft.Json.Converters;
16+
using LBT.Newtonsoft.Json;
17+
using LBT.Newtonsoft.Json.Converters;
1918
using System.ComponentModel.DataAnnotations;
2019
using HoneybeeSchema;
2120

@@ -32,8 +31,8 @@ public partial class ContextShade : IDdBaseModel, System.IEquatable<ContextShade
3231
/// <summary>
3332
/// Initializes a new instance of the <see cref="ContextShade" /> class.
3433
/// </summary>
35-
[LBTNewtonSoft.Newtonsoft.Json.JsonConstructorAttribute]
36-
[System.Text.Json.Serialization.JsonConstructor]
34+
[LBT.Newtonsoft.Json.JsonConstructorAttribute]
35+
// [System.Text.Json.Serialization.JsonConstructor] // for future switching to System.Text.Json
3736
protected ContextShade()
3837
{
3938
// Set readonly properties with defaultValue
@@ -73,7 +72,7 @@ public ContextShade
7372
[Summary(@"An array of planar Face3Ds and or Mesh3Ds that together represent the context shade.")]
7473
[Required]
7574
[DataMember(Name = "geometry", IsRequired = true)] // For Newtonsoft.Json
76-
[System.Text.Json.Serialization.JsonPropertyName("geometry")] // For System.Text.Json
75+
// [System.Text.Json.Serialization.JsonPropertyName("geometry")] // For System.Text.Json
7776
public List<AnyOf<Face3D, Mesh3D>> Geometry { get; set; }
7877

7978
/// <summary>
@@ -82,15 +81,17 @@ public ContextShade
8281
[Summary(@"Extension properties for particular simulation engines (Radiance, EnergyPlus).")]
8382
[Required]
8483
[DataMember(Name = "properties", IsRequired = true)] // For Newtonsoft.Json
85-
[System.Text.Json.Serialization.JsonPropertyName("properties")] // For System.Text.Json
84+
// [System.Text.Json.Serialization.JsonPropertyName("properties")] // For System.Text.Json
8685
public ContextShadePropertiesAbridged Properties { get; set; }
8786

8887
/// <summary>
8988
/// Boolean to note whether this shade is detached from any of the other geometry in the model. Cases where this should be True include shade representing surrounding buildings or context.
9089
/// </summary>
9190
[Summary(@"Boolean to note whether this shade is detached from any of the other geometry in the model. Cases where this should be True include shade representing surrounding buildings or context.")]
9291
[DataMember(Name = "is_detached")] // For Newtonsoft.Json
93-
[System.Text.Json.Serialization.JsonPropertyName("is_detached")] // For System.Text.Json
92+
// [System.Text.Json.Serialization.JsonPropertyName("is_detached")] // For System.Text.Json
93+
[LBT.Newtonsoft.Json.JsonProperty(NullValueHandling = NullValueHandling.Ignore)] // For Newtonsoft.Json
94+
// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] // For System.Text.Json
9495
public bool IsDetached { get; set; } = true;
9596

9697

0 commit comments

Comments
 (0)