Re: [grpc-io] Re: Facing issue to use protobuf in dot net core 6

2024-01-02 Thread Utpal Dutta
Hello,
I am not using protobuf-net.
But thanks I will check it out.

Regards,
Utpal Dutta

On Tue, Jan 2, 2024, 11:53 PM 'yas...@google.com' via grpc.io <
grpc-io@googlegroups.com> wrote:

> Are you using https://github.com/protobuf-net/protobuf-net? If so, you
> might need to raise an issue there.
>
> On Wednesday, December 27, 2023 at 10:35:11 PM UTC-8 Utpal Dutta wrote:
>
>> Hello,
>> I am using Protobuff with dotnet core 6. I am creating CRUD operation
>> through gRPC communication. In my get response I have some nullable
>> properties (string, datetime).
>> Now facing issue when datetime nullable property want to return. Also
>> datetime is returning as a json object. Same for nullable string also.
>> Where as I want the response as normal datetime and string value. Can
>> anyone please help to solve this issue.
>>
>> My proto file look like below:
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *syntax = "proto3";import "google/protobuf/timestamp.proto";import
>> "google/protobuf/wrappers.proto";message GetSiteResponse{ int32 id =
>> 1; string name = 2; google.protobuf.StringValue description = 3; bool
>> deleted = 4; int32 created_user = 5; google.protobuf.Timestamp created_date
>> = 6;  google.protobuf.Int32Value modified_user = 7;
>>  google.protobuf.Timestamp modified_date = 8;}*
>>
>> *---*
>>
>> *My response is coming in below format:*
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> * {"id": 1,"name": "name20",
>> "description": {"value": "desc20"},
>> "deleted": false,"created_user": 1,"created_date":
>> {"seconds": "1702460720","nanos":
>> 41400},"modified_user": {
>> "value": 1},"modified_date": null}*
>>
>>
>> *---*
>>
>> *But I want my response in below format*
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> * {"id": 1,"name": "name20",
>> "description": "desc20","deleted": false,
>> "created_user": 1,"created_date": "2023-12-13T09:45:20.414Z",
>>   "modified_user": 1,"modified_date": null}*
>>
>> *---*
>>
>>
>> *Thanks in advance*
>>
> --
> You received this message because you are subscribed to the Google Groups "
> grpc.io" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to grpc-io+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/grpc-io/addd2eba-bd49-4e70-9ab3-157a69ec3d5cn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CAFUdud3YiuGcWfTae0Gj2g%3DTeKoKN3gOMp85-QUvcS4gN9FewA%40mail.gmail.com.


Re: [grpc-io] Re: Facing issue to use protobuf in dot net core 6

2024-01-02 Thread Utpal Dutta
Hello Larry,
Thank you for your reply.
But I can not use string and Int32 as my values accept null as well. And
string and Int32 can not accept null values.

Regards,
Utpal Dutta

On Wed, Jan 3, 2024, 12:02 AM 'Larry Safran' via grpc.io <
grpc-io@googlegroups.com> wrote:

> Using string and int32 instead of *google.protobuf.StringValue*  and
> *google.protobuf.Int32Value* will change *description* and *modified_user* to
> your desired format.
>
> On Wednesday, December 27, 2023 at 10:35:11 PM UTC-8 Utpal Dutta wrote:
>
>> Hello,
>> I am using Protobuff with dotnet core 6. I am creating CRUD operation
>> through gRPC communication. In my get response I have some nullable
>> properties (string, datetime).
>> Now facing issue when datetime nullable property want to return. Also
>> datetime is returning as a json object. Same for nullable string also.
>> Where as I want the response as normal datetime and string value. Can
>> anyone please help to solve this issue.
>>
>> My proto file look like below:
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *syntax = "proto3";import "google/protobuf/timestamp.proto";import
>> "google/protobuf/wrappers.proto";message GetSiteResponse{ int32 id =
>> 1; string name = 2; google.protobuf.StringValue description = 3; bool
>> deleted = 4; int32 created_user = 5; google.protobuf.Timestamp created_date
>> = 6;  google.protobuf.Int32Value modified_user = 7;
>>  google.protobuf.Timestamp modified_date = 8;}*
>>
>> *---*
>>
>> *My response is coming in below format:*
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> * {"id": 1,"name": "name20",
>> "description": {"value": "desc20"},
>> "deleted": false,"created_user": 1,"created_date":
>> {"seconds": "1702460720","nanos":
>> 41400},"modified_user": {
>> "value": 1},"modified_date": null}*
>>
>>
>> *---*
>>
>> *But I want my response in below format*
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> * {"id": 1,"name": "name20",
>> "description": "desc20","deleted": false,
>> "created_user": 1,"created_date": "2023-12-13T09:45:20.414Z",
>>   "modified_user": 1,"modified_date": null}*
>>
>> *---*
>>
>>
>> *Thanks in advance*
>>
> --
> You received this message because you are subscribed to the Google Groups "
> grpc.io" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to grpc-io+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/grpc-io/b9d77394-8d90-4b5f-9cdd-5b5ba457346dn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CAFUdud0jf7ThMU_M4ekSZnqjCHpaXNwV2RRPvbbWX%2B9EvvUSDw%40mail.gmail.com.


[grpc-io] Re: Facing issue to use protobuf in dot net core 6

2024-01-02 Thread 'Larry Safran' via grpc.io
Using string and int32 instead of *google.protobuf.StringValue*  and 
*google.protobuf.Int32Value* will change *description* and *modified_user* to 
your desired format.

On Wednesday, December 27, 2023 at 10:35:11 PM UTC-8 Utpal Dutta wrote:

> Hello,
> I am using Protobuff with dotnet core 6. I am creating CRUD operation 
> through gRPC communication. In my get response I have some nullable 
> properties (string, datetime).
> Now facing issue when datetime nullable property want to return. Also 
> datetime is returning as a json object. Same for nullable string also. 
> Where as I want the response as normal datetime and string value. Can 
> anyone please help to solve this issue.
>
> My proto file look like below:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *syntax = "proto3";import "google/protobuf/timestamp.proto";import 
> "google/protobuf/wrappers.proto";message GetSiteResponse{ int32 id = 
> 1; string name = 2; google.protobuf.StringValue description = 3; bool 
> deleted = 4; int32 created_user = 5; google.protobuf.Timestamp created_date 
> = 6;  google.protobuf.Int32Value modified_user = 7; 
>  google.protobuf.Timestamp modified_date = 8;}*
>
> *---*
>
> *My response is coming in below format:*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> * {"id": 1,"name": "name20",
> "description": {"value": "desc20"},
> "deleted": false,"created_user": 1,"created_date": 
> {"seconds": "1702460720","nanos": 
> 41400},"modified_user": {
> "value": 1},"modified_date": null}*
>
>
> *---*
>
> *But I want my response in below format*
>
>
>
>
>
>
>
>
>
>
>
> * {"id": 1,"name": "name20",
> "description": "desc20","deleted": false,
> "created_user": 1,"created_date": "2023-12-13T09:45:20.414Z",  
>   "modified_user": 1,"modified_date": null}*
>
> *---*
>
>
> *Thanks in advance*
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/b9d77394-8d90-4b5f-9cdd-5b5ba457346dn%40googlegroups.com.


[grpc-io] Re: Facing issue to use protobuf in dot net core 6

2024-01-02 Thread 'yas...@google.com' via grpc.io
Are you using https://github.com/protobuf-net/protobuf-net? If so, you 
might need to raise an issue there.

On Wednesday, December 27, 2023 at 10:35:11 PM UTC-8 Utpal Dutta wrote:

> Hello,
> I am using Protobuff with dotnet core 6. I am creating CRUD operation 
> through gRPC communication. In my get response I have some nullable 
> properties (string, datetime).
> Now facing issue when datetime nullable property want to return. Also 
> datetime is returning as a json object. Same for nullable string also. 
> Where as I want the response as normal datetime and string value. Can 
> anyone please help to solve this issue.
>
> My proto file look like below:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *syntax = "proto3";import "google/protobuf/timestamp.proto";import 
> "google/protobuf/wrappers.proto";message GetSiteResponse{ int32 id = 
> 1; string name = 2; google.protobuf.StringValue description = 3; bool 
> deleted = 4; int32 created_user = 5; google.protobuf.Timestamp created_date 
> = 6;  google.protobuf.Int32Value modified_user = 7; 
>  google.protobuf.Timestamp modified_date = 8;}*
>
> *---*
>
> *My response is coming in below format:*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> * {"id": 1,"name": "name20",
> "description": {"value": "desc20"},
> "deleted": false,"created_user": 1,"created_date": 
> {"seconds": "1702460720","nanos": 
> 41400},"modified_user": {
> "value": 1},"modified_date": null}*
>
>
> *---*
>
> *But I want my response in below format*
>
>
>
>
>
>
>
>
>
>
>
> * {"id": 1,"name": "name20",
> "description": "desc20","deleted": false,
> "created_user": 1,"created_date": "2023-12-13T09:45:20.414Z",  
>   "modified_user": 1,"modified_date": null}*
>
> *---*
>
>
> *Thanks in advance*
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/addd2eba-bd49-4e70-9ab3-157a69ec3d5cn%40googlegroups.com.