Azure / Azure/Azure-Functions

local.settings.json silently breaks if a JSON object is used in values

Open
#2,620 1 comment 2 reactions 0 assignees View on GitHub
bug
Dominant language
PowerShell
Stars
1.1k
Forks
215
Avg merge
4h 2m
Merged PRs (30d)
1

Description

Versions:
```
Azure Functions Core Tools
Core Tools Version: 4.1.0+7ff2567e43c1ae7471cea7394452c1447661e175 (64-bit)
Function Runtime Version: 4.1040.300.25317
```

Repro (`local.settings.json`):
```javascript
{
"IsEncrypted": false,
"Values": {
"SomeKey": "SomeValue",
"SomeObj": {
"SomeNestedKey": "SomeNestedValue","
}
}
}
```

`SomeKey = null` is null. If you remove or comment out the entire `SomeObj` then `SomeKey = SomeValue`.

Expectation:
I understand KeyValue pairs are supported, but there should be some kind of error handling when a JSON object is used instead. This is a pretty common pattern with app settings.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.