Launch Week Day 1:Rust Support in Socket Is Now Generally Available.Learn More
Socket
Book a DemoInstallSign in
Socket

json-protobuf-encoding

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-protobuf-encoding

JSON encoding for protobuf

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

json-protobuf-encoding

JSON encoding for protobuf

npm install json-protobuf-encoding

Usage

Given a schema

message Test {
  required json misc;
}
var fs = require('fs')
var protobuf = require('protocol-buffers')
var json = require('json-protobuf-encoding')

var messages = protobuf(fs.readFileSync('schema.proto'), {
  encodings: {
    json: json()
  }
})

var data = messages.Test.encode({misc:{hello:'world'}})

License

MIT

FAQs

Package last updated on 02 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts