Method HSResponse.SetContentJson(+ 1 overload)
Overload
JSON-serializes object of type T, and sets HSResponse.Content. Also sets Content-Type header.
public void SetContentJson<T>(T obj, string contentType = "application/json; charset=utf-8")
Parameters
|
obj (T)
Object of type |
|
contentType (string)
If not |
Exceptions
Type Parameters
| T |
Overload(top)
JSON-serializes object of specified type, and sets HSResponse.Content. Also sets Content-Type header.
public void SetContentJson<T>(object obj, Type type, string contentType = "application/json; charset=utf-8")
Parameters
|
obj (object)
Object. |
|
type (Type)
obj type. |
|
contentType (string)
If not |
Exceptions
Type Parameters
| T |