Search code examples
c#jsonapijson.netspotify

Undefine a keyword in C#


I am currently working on an c# application that uses the spotify api. For the parsing of the Newtonsoft stuff I am using Newtonsoft.Json. But when receiving a track, the json includes a key explicit, and explicit is a keyword. So my question is, if there is a way to give the track class a member called explicit


Solution

  • Use the @ prefix to escape reserved keywords.

    var @explicit = ...