messagetemplates / messagetemplates.org

Hosting for messagetemplates.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add semantics for @ and $

StephenCleary opened this issue · comments

Currently the specification calls out @ and $ prefixes, but their semantics are not specified.

It would be nice to have at least an indication of how they are commonly used, even if the specifics are implementation-dependent.

In Serilog, they're defined as follow:

The @ operator in front of SensorInput instructs Serilog to preserve the structure of the object passed in. If this is omitted, Serilog recognises simple types like strings, numbers, dates and times, dictionaries and enumerables; all other objects are converted into strings using ToString(). 'Stringification' can be forced using the $ operator in place of @.

👍 - we should probably insert that passage directly into the spec.