This commit is contained in:
Simon Larsen
2023-04-26 12:28:29 +01:00
parent a9d65681bf
commit b5b10b81a4
3 changed files with 5 additions and 5 deletions

View File

@@ -309,9 +309,10 @@ export default class JSONFunctions {
(val as JSONObject)['_type'] &&
(val as JSONObject)['value'] &&
SerializableObjectDictionary[(val as JSONObject)['_type'] as string]
) {
return SerializableObjectDictionary[(val as JSONObject)['_type'] as string].fromJSON(val)
return SerializableObjectDictionary[
(val as JSONObject)['_type'] as string
].fromJSON(val);
} else if (val instanceof Date) {
return val;
} else if (typeof val === Typeof.Object) {

View File

@@ -1,4 +1,3 @@
import NotImplementedException from './Exception/NotImplementedException';
import { JSONObject } from './JSON';
@@ -16,4 +15,4 @@ export default class SerializableObject {
public fromJSON(json: JSONObject): SerializableObject {
return SerializableObject.fromJSON(json);
}
}
}

View File

@@ -56,4 +56,4 @@ const SerializableObjectDictionary: Dictionary<any> = {
[ObjectType.IsNull]: IsNull,
};
export default SerializableObjectDictionary;
export default SerializableObjectDictionary;