You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found weird behavior, when I serialize message to json at the end there is null character \u0000.
I can't figure out why this is happening, in the end I'm sending this to temporal and deserializing on worker where it fails with Cannot decode json string. I've made small example script in my repo which just call mergeFromJsonString on valid json string and then call serializeToJsonString on resulting message. After valid json there is unexpected null character.
If I run again mergeFromJson string on result I get GPBDecodeException: Error occurred during parsing: Cannot decode json string
What version of protobuf and what language are you using?
Protoc 3.20.2
PHP 7.4
google/protobuf 3.21.6
What operating system (Linux, Windows, ...) and version?
Linux
What runtime / compiler are you using (e.g., python version or gcc version)
PHP 7.4
I found weird behavior, when I serialize message to json at the end there is null character \u0000.
I can't figure out why this is happening, in the end I'm sending this to temporal and deserializing on worker where it fails with Cannot decode json string. I've made small example script in my repo which just call mergeFromJsonString on valid json string and then call serializeToJsonString on resulting message. After valid json there is unexpected null character.
If I run again mergeFromJson string on result I get
GPBDecodeException: Error occurred during parsing: Cannot decode json string
What version of protobuf and what language are you using?
Protoc 3.20.2
PHP 7.4
google/protobuf 3.21.6
What operating system (Linux, Windows, ...) and version?
Linux
What runtime / compiler are you using (e.g., python version or gcc version)
PHP 7.4
What did you do?
Steps to reproduce the behavior:
I have reproduce this here:
https://github.com/keboola/php-storage-driver-teradata/blob/zajca-kbc-2874/test.php
this is only object where encountered this
https://github.com/keboola/php-storage-driver-teradata/blob/zajca-kbc-2874/proto/table.proto#L199
What did you expect to see
Valid json.
What did you see instead?
json with extra unexpected characters
...}. "\0" . ''
at the end which makes json invalidThis is what I see in debugger in my app:
Anything else we should know about your project / environment
I did find out when desalinizing messages in temporal, but problem is somewhere in php protobuf serialization, which proves test.php ^
This looks like that jsonByteSize is wrong and there is one extra byte in buffer
The text was updated successfully, but these errors were encountered: