Search Results for

    Show / Hide Table of Contents

    Class JsonResponse

    • C#
    • Visual Basic
    [JsonObject]
    public class JsonResponse : JsonRequest
    <JsonObject>
    Public Class JsonResponse
        Inherits JsonRequest
    Inheritance
    System.Object
    GenericJsonData
    JsonRequest
    JsonResponse
    JsonError
    PageActionResponse
    Inherited Members
    JsonRequest.RequestKey
    JsonRequest.Request
    GenericJsonData.Data
    GenericJsonData.FromJson(String)
    GenericJsonData.Contains(String)
    GenericJsonData.Get(String)
    GenericJsonData.Put(String, String)
    GenericJsonData.Remove(String)
    GenericJsonData.Clear()
    GenericJsonData.ToJson()
    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 Source

    JsonResponse()

    Create a new, empty JsonResponse

    Declaration
    • C#
    • Visual Basic
    [JsonConstructor]
    public JsonResponse()
    <JsonConstructor>
    Public Sub New
    View Source

    JsonResponse(GenericJsonData)

    Create a new JsonResponse using a set of JSON data

    Declaration
    • C#
    • Visual Basic
    public JsonResponse(GenericJsonData genericJsonData)
    Public Sub New(genericJsonData As 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

    View Source

    JsonResponse(JsonRequest, String)

    Create a new JsonResponse based on a JsonRequest

    Declaration
    • C#
    • Visual Basic
    public JsonResponse(JsonRequest request, string response)
    Public Sub New(request As JsonRequest, response As String)
    Parameters
    Type Name Description
    JsonRequest request

    The JsonRequest to base this response on

    System.String response

    The type of response

    Fields

    View Source

    ResponseKey

    Key that identifies the type of response

    Declaration
    • C#
    • Visual Basic
    protected const string ResponseKey = "response"
    Protected Const ResponseKey As String = "response"
    Field Value
    Type Description
    System.String

    Properties

    View Source

    Response

    The type of the response. This determines the behavior of the client.

    Declaration
    • C#
    • Visual Basic
    [JsonIgnore]
    public string Response { get; set; }
    <JsonIgnore>
    Public Property Response As String
    Property Value
    Type Description
    System.String
    • View Source
    In This Article
    Back to top HomeSeer Technologies