Giter Site home page Giter Site logo

pomelo-protobuf's People

Contributors

d-deo avatar demon0925 avatar fantasyni avatar xiecc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pomelo-protobuf's Issues

Does the promelo-protobuf support mix-type array?

  • For javascript array, we can build an array with mix-type values like [1,2,3,'one','two',three'], and the json string will looks like
 {"users":[[1,"name"],[2,"name"],[3,"name"]]}.
  • My question is does pomelo-protobuf support this json protos?
    Or do I need to convert the json to the format like
{"users":[{"id":1,"name":"name"},{"id":2,"name":"name"},{"id":3,"name":"name"}]}

to use the promelo-protobuf?

Thanks for help.

Don't understand codec tests for SInt64 / UInt64.

https://github.com/pomelonode/pomelo-protobuf/blob/master/test/codecTest.js

as the code for uInt64 codec test:

var limit = 0x7fffffffffffffff;

Why use a 0~1 random number to multiple 0x7FFF FFFF FFFF FFFF as a limitation? (63bits)
WHY NOT using 0xFFFF FFFF FFFF FFFF? (64bits)

AND otherwise ...

the code for sInt64 codec test:

    var limit = 0xfffffffffffff;

It's 54bits.

But for signed int 64bit, because it's been multiple 2 inside the encode function, the limit should be 0x3FFF FFFF FFFF FFFF. (62bits, the head bit for sign, second bit for *2).

So, is there any limitation on UInt64 / SInt64 codec?


I've tested on my Objective-C codec. 0xFFFF...(64bits) works fine on UInt64, and 0x3FFF...(62bits) works find on SInt64.

repeated

  1. 如果在 json文件中添加repeated string域:
    网络传输会失败
  2. 在json文件中添加:repeated int32域,传输正常,但客户端解析的json串有冗余信息
    服务器端数据为:poker : [1,2,3,4]
    以repeated int32 传输后,在客户端解析为
    "poker" : [ {"poker":1},{"poker":2},{"poker":3},{"poker":4}]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.