How to use the protocol-buffers-schema.stringify function in protocol-buffers-schema

To help you get started, we’ve selected a few protocol-buffers-schema examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github okdistribute / jsonschema-protobuf / index.js View on Github external
module.exports = function (schema) {
  if (typeof schema === 'string') schema = JSON.parse(schema)
  var result = {
    syntax: 2,
    package: null,
    enums: [],
    messages: []
  }

  if (schema.type === 'object') {
    result.messages.push(Message(schema))
  }
  return protobuf.stringify(result)
}
github mafintosh / protocol-buffers / index.js View on Github external
Messages.prototype.toString = function () {
    return schema.stringify(sch)
  }

protocol-buffers-schema

No nonsense protocol buffers schema parser written in Javascript

MIT
Latest version published 3 years ago

Package Health Score

70 / 100
Full package analysis

Popular protocol-buffers-schema functions