GithubHelp home page GithubHelp logo

dscr_filecontent's People

Contributors

mkht avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

dscr_filecontent's Issues

Creating a child key will fail when the parent key has value that the type is except hashtable

Steps to reproduce

$output = 'C:\DSCMOF'

@"
{
  "Key1": true
}
"@ | Out-File -FilePath 'C:\Test.json'

Configuration JsonTest
{
    Import-DscResource -ModuleName DSCR_FileContent

    Node localhost
    {
        JsonFile Case1 {
            Path     = 'C:\Test.json'
            Key      = 'Key1/Sub'
            Value    = 'false'
        }
    }
}

JsonTest -OutputPath $output
Start-DscConfiguration -Path $output -Wait

Expected behavior

{
  "Key1": {
    "Sub": false
  }
}

Actual behavior

[System.Boolean] に 'ContainsKey' という名前のメソッドが含まれないため、メソッドの呼び出しに失敗しました。
    + CategoryInfo          : InvalidOperation: (:) []、CimException
    + FullyQualifiedErrorId : MethodNotFound
    + PSComputerName        : localhost
 
Test-TargetResource 機能の実行中に PowerShell DSC リソース [JsonFile]Case1 (SourceInfo '::11::9::JsonFi
le') が 1 つ以上の終了しないエラーをスローしました。これらのエラーは、Microsoft-Windows-DSC/Operational という名前の ETW チャネルに記録さ
れます。詳細については、このチャネルを参照してください。
    + CategoryInfo          : InvalidOperation: (:) []、CimException
    + FullyQualifiedErrorId : NonTerminatingErrorFromProvider
    + PSComputerName        : localhost
 
SendConfigurationApply 関数が失敗しました。
    + CategoryInfo          : NotSpecified: (root/Microsoft/...gurationManager:String) [],  
   CimException
    + FullyQualifiedErrorId : MI RESULT 1
    + PSComputerName        : localhost
 

[JsonFile] Can not set a NULL value

Steps to reproduce

JsonFile Case1 {
    Path     = 'C:\Test.json'
    Key      = 'Key1'
    Value    = 'null'
}

Expected behavior

{
  "Key1": null
}

Actual behavior

{
  "Key1": "null"
}

[JsonFile] Bool型の取り扱いが分かりにくく、意図しない結果になることがある

Steps to reproduce

JsonFile Case1 {
    Path     = 'C:\Test.json'
    Key      = 'Key1'
    Value    = 'true'
}

JsonFile Case2 {
    Path     = 'C:\Test.json'
    Key      = 'Key2'
    Value    = 'True'
}

JsonFile Case3 {
    Path     = 'C:\Test.json'
    Key      = 'Key3'
    Value    = '"true"'
}

JsonFile Case4 {
    Path     = 'C:\Test.json'
    Key      = 'Key4'
    Value    = $true
}

JsonFile Case5 {
    Path     = 'C:\Test.json'
    Key      = 'Key4'
    Value    = '[true]'
}

Expected behavior

{
  "Key1": true,
  "Key2": true,
  "Key3": "true",
  "Key4": true
}

Actual behavior

{
  "Key1": true,
  "Key2": "True",
  "Key3": "true",
  "Key4": "True"
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.