msgpack-js

The msgpack protocol implemented in pure javascript.

  • 所有者: creationix/msgpack-js
  • 平台:
  • 许可证: MIT License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

msgpack for JavaScript

node support

browser support

A handwritten msgpack encoder and decoder for Node.JS and modern browsers.

The original format can be found at http://wiki.msgpack.org/display/MSGPACK/Format+specification

Extension

I've extended the format a little to allow for encoding and decoding of undefined and Buffer instances.

This required three new type codes that were previously marked as "reserved".
This change means that using these new types will render your serialized data
incompatible with other messagepack implementations that don't have the same
extension.

There are two new types for storing node Buffer instances. These work just
like "raw 16" and "raw 32" except they are node buffers instead of strings.

buffer 16  11011000  0xd8
buffer 32  11011001  0xd9

Also I've added a type for undefined that works just like the null type.

undefined  11000100  0xc4

Usage

var msgpack = require('msgpack-js');
var assert = require('assert');

var initial = {Hello: "World"};
var encoded = msgpack.encode(initial);
var decoded = msgpack.decode(encoded);

assert.deepEqual(initial, decoded);

主要指标

概览
名称与所有者creationix/msgpack-js
主编程语言JavaScript
编程语言JavaScript (语言数: 1)
平台
许可证MIT License
所有者活动
创建于2010-12-11 11:33:46
推送于2018-03-05 16:57:01
最后一次提交2018-03-05 10:57:00
发布数6
最新版本名称0.3.0 (发布于 )
第一版名称0.1.0 (发布于 )
用户参与
星数254
关注者数9
派生数44
提交数52
已启用问题?
问题数17
打开的问题数13
拉请求数6
打开的拉请求数1
关闭的拉请求数0
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?