获取可以被序列化的 json 对象,不会自动去除:''、[]、{}
案例一
class Test extends ModelBase {
@Column()
public str?: string
@Column()
public emptyStr?: string
}
const test = new Test({
str: "str",
empty_str: "",
})
console.log(test.getSerializableObject())
// { str: "str", empty_str: "" }