Several serialization and deserialization fixes

This commit is contained in:
barsdeveloper
2023-04-15 12:20:53 +02:00
parent d10589f0bd
commit baf40a9094
17 changed files with 366 additions and 149 deletions

View File

@@ -21,7 +21,7 @@ export default class ToStringSerializer extends Serializer {
* @param {T} entity
* @param {Boolean} insideString
*/
doWrite(entity, insideString) {
doWrite(entity, insideString, indentation = "") {
return !insideString && entity.constructor === String
? `"${Utility.escapeString(entity.toString())}"` // String will have quotes if not inside a string already
: Utility.escapeString(entity.toString())