json-protobuf provides a Json interface to Google's Protocol Buffers compiled in C++ code. The idea is that you can convert a protocol buffer object to a json representation which can be used in API:s.
Producing Code
json-protobuf provides a plugin for the protoc protocol buffer compiler (it ships with protocol buffers). This plugin tells protoc to produce a set of C++ output files, which define the JSON interface to protocol buffers using the json-spirit library (other libraries will/coul be supported).
First, obtain a copy of json-protobuf:
$ git clone git@github.com:mickem/json-protobuf.git
$ cd json-protobuf
Next, install json-protobuf:
$ python setup.py install
Finally, launch protoc and tell it to produce Lua output:
$ protoc -I/path/to/your/proto/files --json_out=/output/path file1.proto file2.proto
You simply need to add --json_out to the arguments to protoc to get it to produce the Json output files.
Under the hood, protoc is looking for the program protoc-gen-json somewhere in your $PATH. You can modify $PATH in lieux of installing the package, if you desire.
Compiling Produced Files
You should be able to compile the produced .h and .cc files like you would for protocol buffer output files. If you have an existing Makefile, project, etc, just add the produced .h and .cc files to it.
Metadata
Release files for json-protobuf 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| json_protobuf-2.0.1.tar.gz | 8.8 kB | Without provenance | Details for json_protobuf-2.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| json_protobuf-2.0.1-py3-none-any.whl | Python 3 | none | any | Details for json_protobuf-2.0.1-py3-none-any.whl |
Total release size: 19.0 kB
Release files / json_protobuf-2.0.1.tar.gz
| Download URL | json_protobuf-2.0.1.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d7ba06ad1d68c0ab3a0faebc4a77d28b616052168b20f6a8d13891dc6c5101d
|
|
BLAKE2b-256 checksum How to use checksums |
90e6536d58b79595acb2fd7c79787b0613d134a7c276bf139e214534448c3d1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.11.4 Windows/10
|
Release files / json_protobuf-2.0.1-py3-none-any.whl
| Download URL | json_protobuf-2.0.1-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
56b5707e718359ed73409ac35de1795eae4a9dbbb703431a7e14537eaf404e0d
|
|
BLAKE2b-256 checksum How to use checksums |
3ab1f7a7d281f61ec7236c26138e78d6667d59c5c1a7cb244893cd7dd9dc97e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.11.4 Windows/10
|
Security for json-protobuf 2.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.