fuwaneko / node-protobuf

Google Protocol Buffers wrapper for Node.js [UNMAINTAINED]
180 stars 42 forks source link

Incorrect parsing to object. Optional properties exist in result object like "prop:null" #2

Closed AlexMarlo closed 11 years ago

AlexMarlo commented 11 years ago

When for example i try to compare objects they are not equal.

fuwaneko commented 11 years ago

Thanks for report. I've updated npm package, please, check if the issue has been resolved.

AlexMarlo commented 11 years ago

another error now it makes empty objects

expected: { messageId: 7824568, sender: 'sender', result: { correlationId: 1234 } }, actual: { messageId: 7824568, sender: 'sender', call: { remote: '' }, result: { correlationId: 1234} },

protofile:

import "call.proto"; import "result.proto";

package message;

message MessageProto { required uint32 messageId = 1; required string sender = 2;

optional Call call = 3;
optional Result result = 4;

}

fuwaneko commented 11 years ago

@AlexMarlo Should be fixed now, please, check out new update.

AlexMarlo commented 11 years ago

Great! All my test passed))) Big thanks! Большое Спасибо)))