Various fixes

This commit is contained in:
barsdeveloper
2022-03-19 14:46:53 +01:00
parent 391a537a78
commit 42615b93f8
25 changed files with 267 additions and 131 deletions

View File

@@ -51,14 +51,14 @@ export default class ISerializer {
let result = ""
let fullKey = key.concat("")
const last = fullKey.length - 1
for (const property in object) {
for (const property of Object.getOwnPropertyNames(object)) {
fullKey[last] = property
const value = object[property]
if (object[property]?.constructor === Object) {
// Recursive call when finding an object
result += (result.length ? this.separator : "")
+ this.subWrite(fullKey, value)
} else if (this.showProperty(fullKey, value)) {
} else if (value !== undefined && this.showProperty(fullKey, value)) {
result += (result.length ? this.separator : "")
+ this.prefix
+ this.attributeKeyPrinter(fullKey)