Skip to content

hessian.js序列化异常,同一个类,可选参数不同,会读缓存的上一个类 #130

@tyouzu1

Description

@tyouzu1

有一个类 A = { x, y },内部参数是可选的,比如{x} {y}
这次请求 参数为 { a: {x} , b: { c: { y } }},也就是两次使用A类,一次为{x} 一次为{y}
序列化的时候会出现问题
image
this._classRefFields 会存一个{x}的类的key ,导致{y}参数序列化的时候,读了上一次的缓存,找不到y 的key

this.write(realObj[key]); 的时候就没法写入 y 参数

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions