node-modules/antpb

Name: antpb

Owner: node_modules

Description: Protocol Buffers for JavaScript. It from the dcodeIO protobufjs, we modify some files to achieve our need.

Created: 2018-05-16 07:38:59.0

Updated: 2018-05-16 11:26:24.0

Pushed: 2018-05-16 11:26:33.0

Homepage: null

Size: 15

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

antpb

Protocol Buffers for JavaScript. It from the dcodeIO protobufjs, we modify some files to achieve our need.

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Install
pm install antpb --save
Usage
t protobuf = require('antpb');

t root = protobuf.loadAll('/proto_file_path');

t ProtoObj = root.lookup('com.alipay.test.service.ProtoObj');
t map = new Map();
set(false, {
me: 'Peter',
nalField: '123',


t req = ProtoObj.create({
stObj2: {
name: 'zongyu',
finalField: '321',

p3: map,


t buf = ProtoObj.encode(req).finish();
t ret = ProtoObj.decode(buf); // => { testObj2: { name: 'zongyu', finalField: '321' }, map3: <Map> }
t protobuf = require('@alipay/protobufjs');

t root = protobuf.fromJSON(/proto_json_file_path);


API
Top API
Other API

refer: https://github.com/dcodeIO/protobuf.js


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.