← Prev in month ← Prev in thread
Next in thread → Next in month →

Change to agreed amendments to #204

From
Larry Golding \(Comcast\) <>
Date
2018-09-04T20:38:37+00:00
ID
[email protected]
Thread
Change to agreed amendments to #204
In TC #22 we agreed to amend #204 by making region.charOffset and region.byteOffset nullable integers instead of plain integers, so that consumers could distinguish a missing property from a 0-valued property.

 

In a phone call last week, Michael, Jim and I reached the conclusion that this is not necessary, and the distinction can be made at the SDK level rather than at the file format leve. A JSON deserializer such as Newtonsoft.Json can already do the following:

 

On input, distinguish between a missing property and a zero-valued property

On input, specify a default value for a missing property.

On output, specify that a property with the default value not be serialized.

 

So in the SDK, we just have to specify the otherwise-unused value -1 as the default value of region.charOffset and region.byteOffset, and to specify that those properties not be serialized if they have the default value. There is no need to change the spec.

 

I merged the changes for #204 into the provisional draft without making the changes to nullable integers. Since this is not what we agreed in TC #22, I will add an agenda item to allow the TC to ratify this change.

 

Thanks,

Larry
← Prev in month ← Prev in thread
Next in thread → Next in month →