{"action":"closed","issue":{"url":"https://api.github.com/repos/dcodeIO/protobuf.js/issues/478","repository_url":"https://api.github.com/repos/dcodeIO/protobuf.js","labels_url":"https://api.github.com/repos/dcodeIO/protobuf.js/issues/478/labels{/name}","comments_url":"https://api.github.com/repos/dcodeIO/protobuf.js/issues/478/comments","events_url":"https://api.github.com/repos/dcodeIO/protobuf.js/issues/478/events","html_url":"https://github.com/dcodeIO/protobuf.js/issues/478","id":183469879,"number":478,"title":"Message.encodeJSON output is incompatible with Message.decodeJSON","user":{"login":"gmatroskin","id":4924760,"avatar_url":"https://avatars.githubusercontent.com/u/4924760?v=3","gravatar_id":"","url":"https://api.github.com/users/gmatroskin","html_url":"https://github.com/gmatroskin","followers_url":"https://api.github.com/users/gmatroskin/followers","following_url":"https://api.github.com/users/gmatroskin/following{/other_user}","gists_url":"https://api.github.com/users/gmatroskin/gists{/gist_id}","starred_url":"https://api.github.com/users/gmatroskin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmatroskin/subscriptions","organizations_url":"https://api.github.com/users/gmatroskin/orgs","repos_url":"https://api.github.com/users/gmatroskin/repos","events_url":"https://api.github.com/users/gmatroskin/events{/privacy}","received_events_url":"https://api.github.com/users/gmatroskin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-17T16:53:10Z","updated_at":"2016-11-28T17:27:49Z","closed_at":"2016-11-28T17:27:49Z","body":"In an express app I am building, I tried to create an encoding agnostic endpoint that can accept a protobuf represented as JSON if given `application/json` as content type - the primary goal being easier testing in dev.\n\nMy plan was to use `encodeJSON/decodeJSON` to accomplish this, but I found that the two functions appear incompatible due to `encodeJSON` including the _virtual_ `oneof` fields, and `decodeJSON` failing to recognize them.  Not sure if I am missing something \n\nAssuming this is indeed an issue, I feel like the right way to solve this may be to exclude the virtual fields from `encodeJSON` output, but that will probably be a breaking change for most people, so perhaps making the parser ignore them (possibly having verified they are correctly set) is a good compromise...\n"}}
{"actor":{"display_login":"dcodeIO"}}