[]
        
(Showing Draft Content)

C1.Web.Mvc.Serialization.JsonConvertHelper.C1Json

C1Json Method

C1Json(Controller, object, bool)

Creates a Microsoft.AspNetCore.Mvc.JsonResult object that serializes the specified data object to JSON.

Declaration
public static JsonResult C1Json(this Controller controller, object data, bool useCamelCasePropertyName = true)
Parameters
Type Name Description
Controller controller

The specified controller.

object data

The object to serialize.

bool useCamelCasePropertyName

A bool value decides whether to use camel case to serialize the data.

Returns
Type Description
JsonResult

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

C1Json(object, bool)

Creates a Microsoft.AspNetCore.Mvc.JsonResult object that serializes the specified data object to JSON.

Declaration
public static JsonResult C1Json(object data, bool useCamelCasePropertyName = true)
Parameters
Type Name Description
object data

The object to serialize.

bool useCamelCasePropertyName

A bool value decides whether to use camel case to serialize the data.

Returns
Type Description
JsonResult

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