{"action":"created","issue":{"url":"https://api.github.com/repos/nanopb/nanopb/issues/368","repository_url":"https://api.github.com/repos/nanopb/nanopb","labels_url":"https://api.github.com/repos/nanopb/nanopb/issues/368/labels{/name}","comments_url":"https://api.github.com/repos/nanopb/nanopb/issues/368/comments","events_url":"https://api.github.com/repos/nanopb/nanopb/issues/368/events","html_url":"https://github.com/nanopb/nanopb/issues/368","id":390072716,"node_id":"MDU6SXNzdWUzOTAwNzI3MTY=","number":368,"title":"Proper way to send an encoded data","user":{"login":"masoudr","id":6974428,"node_id":"MDQ6VXNlcjY5NzQ0Mjg=","avatar_url":"https://avatars0.githubusercontent.com/u/6974428?v=4","gravatar_id":"","url":"https://api.github.com/users/masoudr","html_url":"https://github.com/masoudr","followers_url":"https://api.github.com/users/masoudr/followers","following_url":"https://api.github.com/users/masoudr/following{/other_user}","gists_url":"https://api.github.com/users/masoudr/gists{/gist_id}","starred_url":"https://api.github.com/users/masoudr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masoudr/subscriptions","organizations_url":"https://api.github.com/users/masoudr/orgs","repos_url":"https://api.github.com/users/masoudr/repos","events_url":"https://api.github.com/users/masoudr/events{/privacy}","received_events_url":"https://api.github.com/users/masoudr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-12T05:39:45Z","updated_at":"2018-12-12T07:36:46Z","closed_at":"2018-12-12T07:04:05Z","author_association":"NONE","body":"Hi,\r\nI'm trying to send an encoded buffer (array of `unsigned char`) from a server to a client with an http request. My first attempt was to convert the array of `unsigned char` to equivalent ASCII string and then send throw the network. for example, suppose this buffer:\r\n\r\n    unsigned char buffer[] = {72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 0, 24, 1, 32, 1, 40, 0};\r\nAnd if I convert it to a string I would have this:\r\n\r\n> Hello world \u0018\u0001 \u0001(\r\n\r\nwhich has null terminating chars and I have problems on the client side to read it back because I can't find the end of the message and reconstruct the buffer. Is there any way to create a string from ProtoBuf output with minimal length?\r\nI found that there is `SerializeToString` in ProtoBuf but it is missing in NanoPB."},"comment":{"url":"https://api.github.com/repos/nanopb/nanopb/issues/comments/446490949","html_url":"https://github.com/nanopb/nanopb/issues/368#issuecomment-446490949","issue_url":"https://api.github.com/repos/nanopb/nanopb/issues/368","id":446490949,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NjQ5MDk0OQ==","user":{"login":"masoudr","id":6974428,"node_id":"MDQ6VXNlcjY5NzQ0Mjg=","avatar_url":"https://avatars0.githubusercontent.com/u/6974428?v=4","gravatar_id":"","url":"https://api.github.com/users/masoudr","html_url":"https://github.com/masoudr","followers_url":"https://api.github.com/users/masoudr/followers","following_url":"https://api.github.com/users/masoudr/following{/other_user}","gists_url":"https://api.github.com/users/masoudr/gists{/gist_id}","starred_url":"https://api.github.com/users/masoudr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masoudr/subscriptions","organizations_url":"https://api.github.com/users/masoudr/orgs","repos_url":"https://api.github.com/users/masoudr/repos","events_url":"https://api.github.com/users/masoudr/events{/privacy}","received_events_url":"https://api.github.com/users/masoudr/received_events","type":"User","site_admin":false},"created_at":"2018-12-12T07:36:46Z","updated_at":"2018-12-12T07:36:46Z","author_association":"NONE","body":"@PetteriAimonen OK, but what is the proper way to send them over a network?"}}
{"actor":{"display_login":"masoudr"}}