If you create an ldvalue.Value with the ldvalue.Raw(json.RawMessage) constructor, and you pass a zero-length or nil value to the constructor, and then encode the Value to JSON with json.Marshal or an equivalent method, the JSON output will now be null (that is, the literal characters null representing a JSON null value). Previously it would have been a zero-length string, which is not valid as the JSON encoding of any value and could cause the SDK to output a malformed JSON document if the document contained such a value.
[2.5.1] - 2022-06-29
Changed:
ldvalue.Value
with theldvalue.Raw(json.RawMessage)
constructor, and you pass a zero-length or nil value to the constructor, and then encode theValue
to JSON withjson.Marshal
or an equivalent method, the JSON output will now benull
(that is, the literal charactersnull
representing a JSON null value). Previously it would have been a zero-length string, which is not valid as the JSON encoding of any value and could cause the SDK to output a malformed JSON document if the document contained such a value.