ASP.NET Core MVC Controls | ComponentOne
C1.Web.Mvc.Serialization Namespace / JsonConvertHelper Class / C1Json Method / C1Json(Object,Boolean) Method
The object to serialize.
A System.Boolean value decides whether to use camel case to serialize the data.






In This Topic
    C1Json(Object,Boolean) Method
    In This Topic
    Creates a Microsoft.AspNetCore.Mvc.JsonResult object that serializes the specified data object to JSON.
    Syntax
    'Declaration
     
    
    Public Overloads Shared Function C1Json( _
       ByVal data As System.Object, _
       Optional ByVal useCamelCasePropertyName As System.Boolean _
    ) As Microsoft.AspNetCore.Mvc.JsonResult
    'Usage
     
    
    Dim data As System.Object
    Dim useCamelCasePropertyName As System.Boolean
    Dim value As Microsoft.AspNetCore.Mvc.JsonResult
     
    value = JsonConvertHelper.C1Json(data, useCamelCasePropertyName)
    public static Microsoft.AspNetCore.Mvc.JsonResult C1Json( 
       System.object data,
       System.bool useCamelCasePropertyName
    )
    public function C1Json( 
        data: System.TObject;
        useCamelCasePropertyName: System.Boolean
    ): Microsoft.AspNetCore.Mvc.JsonResult; static; 
    public static function C1Json( 
       data : System.Object,
       useCamelCasePropertyName : System.boolean
    ) : Microsoft.AspNetCore.Mvc.JsonResult;
    public: static Microsoft.AspNetCore.Mvc.JsonResult* C1Json( 
       System.Object* data,
       System.bool useCamelCasePropertyName
    ) 
    public:
    static Microsoft.AspNetCore.Mvc.JsonResult^ C1Json( 
       System.Object^ data,
       System.bool useCamelCasePropertyName
    ) 

    Parameters

    data
    The object to serialize.
    useCamelCasePropertyName
    A System.Boolean value decides whether to use camel case to serialize the data.

    Return Value

    The created Microsoft.AspNetCore.Mvc.JsonResult that serializes the specified data to JSON format for the response.
    See Also