Apply suggestion from @kamronbatman
This commit is contained in:
parent
15e77506c5
commit
b8e2b2d0be
1 changed files with 0 additions and 3 deletions
|
|
@ -175,9 +175,6 @@ public class Rectangle3DConverter : JsonConverter<Rectangle3D>
|
|||
|
||||
public override void Write(Utf8JsonWriter writer, Rectangle3D value, JsonSerializerOptions options)
|
||||
{
|
||||
// Omit z only for the exact full-range sentinel DeserializeObj reconstructs when z is absent
|
||||
// (z1 == -128, z2 == 127). Any other z must be written, otherwise it round-trips to that
|
||||
// sentinel and is corrupted (e.g. a homeRange-style z1=-128/z2=128 would lose a z-level).
|
||||
var writeZ = value.Start.Z != sbyte.MinValue || value.End.Z != sbyte.MaxValue;
|
||||
|
||||
writer.WriteStartObject();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue