Skip to content

How to keep the original value type after field is replaced in JSON file?(Boolean) #135

@XVCoder

Description

@XVCoder

Here goes the example:

Target JSON

{
  "Logging": {
    "IncludeScopes": false,
    "LogLevel": {
      "Default": "Debug",
      "System": "Information",
      "Microsoft": "Information"
    }
  }
}

Transformation for the config:

{
  "Logging/IncludeScopes": true
}

Expected transformation result:

{
  "Logging": {
    "IncludeScopes": true,
    "LogLevel": {
      "Default": "Debug",
      "System": "Information",
      "Microsoft": "Information"
    }
  }
}

Actually transformation result:

{
  "Logging": {
    "IncludeScopes": "True",
    "LogLevel": {
      "Default": "Debug",
      "System": "Information",
      "Microsoft": "Information"
    }
  }
}

The result is: the boolean value [false] has been replaced with ["True"].
How to keep the original value type after field is replaced in JSON file?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions