diff options
| author | thenewone <[email protected]> | 2025-08-20 23:35:13 +0300 |
|---|---|---|
| committer | thenewone <[email protected]> | 2025-08-20 23:50:07 +0300 |
| commit | b423e9950fa2e55342711e1e42c80ab358aab08a (patch) | |
| tree | 5bc070fe3e7308816890a3ec1a89d3653b37e42a /library/cpp/cache/thread_safe_cache.cpp | |
| parent | afccfc3d1a5a75ea4d6d80664f3fb3e3767ef502 (diff) | |
Omit null YsonString members while encoding YsongStruct
By default TYsonString is in null state (see default constructor)
which means that is does not contain any value. Obviously this state
is not a valid serialized value because you can't serialize nothing.
If TYsonString is used as a member of TYsonStruct, it must contain
a valid serialized value. So before this commit if such a member
was in null (empty, default) state the serialization would fail.
This patch enables serialization of null TYsonString members of
TYsonStruct. If the member is in null state (and the default value
is null state too) then this member is simply omitted during
serialization. Deserialization of such struct will set default
value (which is null state) and that seems to be correct.
commit_hash:06a4d3c930268d376588e0476861ff152f7ad983
Diffstat (limited to 'library/cpp/cache/thread_safe_cache.cpp')
0 files changed, 0 insertions, 0 deletions
