https://github.com/spring-projects/spring-boot/blob/50d05192c828a299002ccf71020dbe0f7ea0499b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/external-config.adoc?plain=1#L914-L915

It would be nice if more words here to show the motivation.

Comment From: quaff

Further more, if possible, I think it should raise error with meaningful message instead of removing characters silently.

Comment From: wilkinsona

We documented when and why the special bracket notation is needed in https://github.com/spring-projects/spring-boot/issues/13506. This was then refined in https://github.com/spring-projects/spring-boot/issues/23390. I don't think we should get into the why in the reference documentation. My feeling is that it's a level of detail that the vast majority of users don't need and it will make the documentation unnecessarily verbose. Let's see what the rest of the team thinks.

Comment From: mhalbritter

I agree with Andy. I think we should document the observable behavior, and not necessarily the why.

Comment From: quaff

We documented when and why the special bracket notation is needed in #13506. This was then refined in #23390. I don't think we should get into the why in the reference documentation. My feeling is that it's a level of detail that the vast majority of users don't need and it will make the documentation unnecessarily verbose. Let's see what the rest of the team thinks.

How about adding a link to #23390?

Comment From: snicoll

We shouldn't link the issue tracker from our reference doc. I also think that it would make the doc unnecessarily verbose.

Comment From: bclozel

With my vote, this makes the majority of the team. Sorry @quaff but the reference docs are not meant to track design decisions and tradeoffs but rather describe how things work.

Comment From: quaff

Further more, if possible, I think it should raise error with meaningful message instead of removing characters silently.

@philwebb How about this proposal?

The current behavior is counter-intuitive, there are several issues that reporter is confused by my.map./key3=value3 is mapped as key3=value3, exception should be thrown to state that last element of the ConfigurationPropertyName should be written as ElementType.INDEXED instead of ElementType.NON_UNIFORM, better than documenting that, not everyone read document before writing code. It's indeed a breaking change, but I doubt someone would rely on such quirk behavior, it's not worthy to make it as an opt-in feature.

EDIT: I created prototype https://github.com/spring-projects/spring-boot/compare/main...quaff:spring-boot:patch-87?expand=1