Alex Kuznetsov
04/11/2025, 5:51 PMLanguage
annotation on a String literal for syntax highlighting and such, for example
@Language("SQL")
val sql = "SELECT weight, name FROM boxes"
But I'm reviewing code where parameters are annotated with it:
`fun doSomething(@Language("JSON") payload: String) { ...
why would we want to do that? what does it buy us?phldavies
04/11/2025, 5:54 PMdoSomething("""{"this": "would automatically be highlighted as JSON"}""")
phldavies
04/11/2025, 5:54 PMAlex Kuznetsov
04/11/2025, 6:18 PMKlitos Kyriacou
04/14/2025, 3:39 PMphldavies
04/14/2025, 4:13 PM"""{"my-key": "${value}"}"""