Make Serializer.stringifyJsObject() private.

This commit is contained in:
László Monda
2016-04-08 01:42:14 +02:00
parent 3d55ff75e9
commit 9c532ecdf7

View File

@@ -8,13 +8,6 @@ abstract class Serializable<T> {
private static maxDisplayedJsonLength = 160;
private static enableDump = true;
strintifyJsObject(jsObject: any): string {
let json = JSON.stringify(jsObject);
return json.length > Serializable.maxDisplayedJsonLength
? json.substr(0, Serializable.maxDisplayedJsonLength) + '...'
: json;
}
fromJsObject(jsObject: any): Serializable<T> {
let isArray = this instanceof ClassArray;
this.dumpMethodName('fromJsObject');
@@ -86,4 +79,11 @@ abstract class Serializable<T> {
let indentation = new Array(Serializable.depth + 1).join(' ');
this.dump(`${indentation}${this.constructor.name}.${methodName}: `);
}
private strintifyJsObject(jsObject: any): string {
let json = JSON.stringify(jsObject);
return json.length > Serializable.maxDisplayedJsonLength
? json.substr(0, Serializable.maxDisplayedJsonLength) + '...'
: json;
}
}