Serialize NAV objects as JSON

Today in a forum someone asks this question: can I serialize a Microsoft Dynamics NAV object (record in a table) as JSON in C/AL? The new AL language (Extensions 2.0) has native support for JSON (for example JsonObjectClass ) but in C/AL there’s no a native way to serialize objects as JSON. JSON is supported only in OData objects (by appending  ?$format=json in the url). In C/AL we can use the wonderful JSON.NET addin (always available when installing Visual Studio on your machine) and more