Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

writeObject 判断类型要更灵活 #39

Open
dead-horse opened this issue Mar 12, 2015 · 11 comments
Open

writeObject 判断类型要更灵活 #39

dead-horse opened this issue Mar 12, 2015 · 11 comments

Comments

@dead-horse
Copy link
Member

可能是一个 Function 的示例
https://github.com/node-modules/hessian.js/blob/master/lib/v1/encoder.js#L30

@fengmk2
Copy link
Member

fengmk2 commented Mar 12, 2015

看不懂?

@dead-horse
Copy link
Member Author

function Map() {};
{$class: 'map', $: new Map()}

有人这样写。。

@fengmk2
Copy link
Member

fengmk2 commented Mar 12, 2015

呃。。。打他 pp

@fengmk2
Copy link
Member

fengmk2 commented Mar 12, 2015

不能兼容这种。。。要不然代码不堪设想啊

@dead-horse
Copy link
Member Author

当 java 写。。

@luckydrq
Copy link

这人是我,不要打我。。

@dead-horse
Copy link
Member Author

哈哈

@fengmk2
Copy link
Member

fengmk2 commented Mar 16, 2015

呃,那Map的序列化是怎样实现的?

@luckydrq
Copy link

主要是Map里面有function。。

function Map(options) {
  this.a = options.a;
  this.b = options.b;
}
Map.prototype.fn = function() {};

@fengmk2
Copy link
Member

fengmk2 commented Mar 16, 2015

提 pr 吧,直接看代码

@Corey600
Copy link

请问没有做枚举类型的序列化吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants