toJSON(obj) {
        var serializer = Serializers[obj.constructor.name];

        if (serializer === undefined) {
            console.warn(`CamerasSerializer: No serializer with ${obj.constructor.name}.`);
            return null;
        }

        return new serializer().toJSON(obj);
    }
CamerasSerializer
@author tengge / https://github.com/tengge1