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

withType return all type info for v1 #26

Merged
merged 1 commit into from
Jun 25, 2014
Merged

withType return all type info for v1 #26

merged 1 commit into from
Jun 25, 2014

Conversation

dead-horse
Copy link
Member

withType 返回所有的数据的类型:

1.1

yield:

{
  $class: 'double',
  $: 1.1
}

不丢失信息,且格式统一

name: 'GREEN'
'$class': 'hessian.Main$Color',
'$': {
name: { '$class': 'java.lang.String', '$': 'GREEN' }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

像这种太坑爹了... Enum 的 name 字段还需要这样表示

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hessian 这层不做处理,后面让拿到结果的人做封装吧。

var a = createConsumer({withType: true});

a.addFilter('hessian.Main$Color', function (input) {
  return input.$.name.$;
});

a.invoke('fun', args, function (err ,res) {
  // res === 'GREEN'
});

@fengmk2
Copy link
Member

fengmk2 commented Jun 25, 2014

+1

fengmk2 added a commit that referenced this pull request Jun 25, 2014
withType return all type info for v1
@fengmk2 fengmk2 merged commit eabc4a9 into master Jun 25, 2014
@fengmk2 fengmk2 deleted the full-with-type branch June 25, 2014 03:08
@dead-horse
Copy link
Member Author

2.0 我没改,现在有在用么?

@fengmk2
Copy link
Member

fengmk2 commented Jun 25, 2014

没有人使用。。。
2014-6-25 上午11:12于 "dead_horse" notifications@github.com写道:

2.0 我没改,现在有在用么?


Reply to this email directly or view it on GitHub
#26 (comment)
.

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

Successfully merging this pull request may close these issues.

2 participants