
// simple wrapper to convert from protobuf to JSON
//

var jspb = require("google-protobuf");
var goog = jspb;
var pb = require("./gtfs-realtime_pb.js");

function pb2json(payload) {
  var fm = pb.FeedMessage.deserializeBinary( new Uint8Array(payload) );
  return fm.toObject();
}

module.exports = {
  "pb2json" : pb2json
}


