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?
Here goes the example:
Target JSON
{ "Logging": { "IncludeScopes": false, "LogLevel": { "Default": "Debug", "System": "Information", "Microsoft": "Information" } } }Transformation for the config:
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?