Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

jobject alternative in system.text.json


public class MyDTO
{
    public JsonElement ExtractedData {get;set;} = JsonExtensions.Null;
}

public static class JsonExtensions
{
    static readonly JsonElement nullElement = CreateNull();

    public static JsonElement Null => nullElement;

    static JsonElement CreateNull()
    {
        using var doc = JsonDocument.Parse("null");
        return doc.RootElement.Clone();
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: AuthenticationTicket authenticationProperties C# .net 
Csharp :: read system data dataset 
Csharp :: dataannotations for currency in c# 
Csharp :: json serialize object capitalization config 
Csharp :: wpf rounded button 
Csharp :: wpf binding to static property in code behind 
Csharp :: hide component in component menu 
Csharp :: aspnet for loop 
Csharp :: difference between iqueryable and ienurable 
Csharp :: c# different getter setter types 
Csharp :: function to accept interger 
Csharp :: C# HttpUtility not found / missing C# 
Csharp :: c# extension method example 
Csharp :: asp.net session empty cehck 
Csharp :: c# multipthreading 
Csharp :: How to determine whether Task.Run is completed within a loop in c# 
Csharp :: psobject get service name 
Csharp :: drop column with code first asp.net core 
Csharp :: how to detach the camera from the player after death unity 
Csharp :: c# run program as an administrator 
Csharp :: Deserialize a Dictionary 
Csharp :: asp net identity extend relationship 
Csharp :: Fix Array outside the bonus 
Csharp :: csv to dataset c# 
Csharp :: lambda not null c# 
Csharp :: unrecognized escape sequence c# connection string 
Csharp :: .net return manual status code 
Csharp :: Focus on last entry in listbox 
Csharp :: razor preview 
Csharp :: The anti-forgery cookie token and form field token do not match. 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =