I was wanting a clean way to convert a C# Boolean property on a view model into a javascript true / false bit of text for passing into our Typescript context settings constructors, and stumbled upon this way …
@Json.Encode(Model.BoolPropertyName)
Works a treat too!