protocolbuffers / protocolbuffers/protobuf-javascript
Protobuf message from JSON in javascript
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 471
- Forks
- 91
- Avg merge
- 3h 57m
- Merged PRs (30d)
- 2
Description
In python/C#/C/Go/... generated code it is possible to create a proto message instance from JSON. E.g. in Python where you can just do google.protobuf.json_format.Parse(json, message). I would expect the [JavaScript generated code (here and here) to offer the same, but unfortunately this is not the case.
I am currently sending my JSON in a Struct and receiving the same back. So now I want to upack that Struct and get the message back. But I don't know how.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the JavaScript generated code linked in the issue and the referenced JavaScript documentation for Any. Compare the requested behavior with Python's json_format.Parse and examine how the current Struct-based flow represents the message. Done means JavaScript generated messages support a documented JSON-to-message path, including the reported Struct use case, with accompanying tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100