Class JsonResponse
[JsonObject]
public class JsonResponse : JsonRequest
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: HomeSeer.PluginSdk.Features.Responses
Assembly: PluginSdk.dll
A POST response with JSON data for a feature page as a collection of key-value pairs
Remarks
A default handler is provided for you in the FeaturePagePost.js page. Include that file with your plugin's feature pages and customize it as needed. A shared version will be implemented in a future release.
Constructors
View SourceJsonResponse()
Create a new, empty JsonResponse
Declaration
[JsonConstructor]
public JsonResponse()
JsonResponse(GenericJsonData)
Create a new JsonResponse using a set of JSON data
Declaration
public JsonResponse(GenericJsonData genericJsonData)
Parameters
| Type | Name | Description |
|---|---|---|
| GenericJsonData | genericJsonData | The GenericJsonData that describes the response |
Exceptions
| Type | Condition |
|---|---|
| System.Collections.Generic.KeyNotFoundException | Thrown if no Response type is defined in the data |
JsonResponse(JsonRequest, String)
Create a new JsonResponse based on a JsonRequest
Declaration
public JsonResponse(JsonRequest request, string response)
Parameters
| Type | Name | Description |
|---|---|---|
| JsonRequest | request | The JsonRequest to base this response on |
| System.String | response | The type of response |
Fields
View SourceResponseKey
Key that identifies the type of response
Declaration
protected const string ResponseKey = "response"
Field Value
| Type | Description |
|---|---|
| System.String |
Properties
View SourceResponse
The type of the response. This determines the behavior of the client.
Declaration
[JsonIgnore]
public string Response { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |