mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-15 09:44:49 +08:00
Serialization fixed
This commit is contained in:
@@ -3,9 +3,9 @@ import Serializer from "./Serializer"
|
||||
|
||||
export default class GeneralSerializer extends Serializer {
|
||||
|
||||
constructor(keyword, entityType, prefix, separator, trailingSeparator, attributeValueConjunctionSign, attributeKeyPrinter) {
|
||||
constructor(wrap, entityType, prefix, separator, trailingSeparator, attributeValueConjunctionSign, attributeKeyPrinter) {
|
||||
super(entityType, prefix, separator, trailingSeparator, attributeValueConjunctionSign, attributeKeyPrinter)
|
||||
this.keyword = keyword ?? ""
|
||||
this.wrap = wrap ?? (v => `(${v})`)
|
||||
}
|
||||
|
||||
read(value) {
|
||||
@@ -19,7 +19,7 @@ export default class GeneralSerializer extends Serializer {
|
||||
}
|
||||
|
||||
write(object) {
|
||||
let result = `${this.keyword}(${this.subWrite([], object)})`
|
||||
let result = this.wrap(this.subWrite([], object))
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user