private/Functions/Read-CTConfiguration.ps1

Function Read-CTConfiguration {
    [cmdletBinding()] 
    Param(
        [Parameter(Mandatory=$false)]
        [string]$ConfigFilePath=$Script:ConfigLocation
    )
    
    $Obj = Get-Content -Path $ConfigFilePath | ConvertFrom-Json
    $ParsedConfig = $obj | ConvertTo-HashTable


    if($ParsedConfig) {
        $script:Config = $ParsedConfig
        Write-CTConfiguration -ConfigFilePath $Script:BackupConfigLocation
        Write-Verbose "Writing copy to $Script:BackupConfigLocation"
    }

    

    <#
        For Testing:
        $obj = Get-Content -Path "$($env:APPDATA)\.CameraTools\config.json" | ConvertFrom-JSON
        $Config = $obj | ConvertTo-HashTable
    #>

}