Azure-Functions icon indicating copy to clipboard operation
Azure-Functions copied to clipboard

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

Open ghost opened this issue 5 months ago • 1 comments

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):

{
  "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.

ghost avatar Jul 24 '25 15:07 ghost

This feels like it needs some validation in place, Can someone assign it to me so that I can check further?

thatrajeevkr avatar Aug 27 '25 22:08 thatrajeevkr