JsonQueryStringConverter JsonQueryStringConverter JsonQueryStringConverter JsonQueryStringConverter Class


This class converts a parameter value to and from a JavaScript Object Notation (JSON).

public ref class JsonQueryStringConverter : System::ServiceModel::Dispatcher::QueryStringConverter
public class JsonQueryStringConverter : System.ServiceModel.Dispatcher.QueryStringConverter
type JsonQueryStringConverter = class
    inherit QueryStringConverter
Public Class JsonQueryStringConverter
Inherits QueryStringConverter


Parameters can be specified in a JSON query string within a URL. This class controls how JSON query string parameters are mapped to and from a service operation's parameters when the WebScriptEnablingBehavior is used to process HTTP requests from browser-based ASP.NET AJAX clients.

This class is used internally by the Windows Communication Foundation (WCF)WebScriptEnablingBehavior class for endpoints configured to accept HTTP GET/POST requests with parameters encoded in the URI query string. This class is used to convert between CLR objects and the individual operation request parameter values in the URI query string. Unlike its base type, this class supports values of both primitive and complex types.

JsonQueryStringConverter derives from QueryStringConverter and supports the following types:

Unlike its base type, this converter can handle any type adhering to the Data Contract model. The converter overrides ConvertValueToString(Object, Type) so that each parameter is serialized to JSON using the default DataContractJsonSerializer and a JSON XML Writer configured to use the UTF-8 encoding. null parameters are returned as null.


JsonQueryStringConverter() JsonQueryStringConverter() JsonQueryStringConverter() JsonQueryStringConverter()

Initializes a new instance of the JsonQueryStringConverter class.


CanConvert(Type) CanConvert(Type) CanConvert(Type) CanConvert(Type)

Gets a value that indicates whether a Common Language Runtime (CLR) type specified is a known type that can be serialized and deserialized.

ConvertStringToValue(String, Type) ConvertStringToValue(String, Type) ConvertStringToValue(String, Type) ConvertStringToValue(String, Type)

Deserializes a JavaScript Object Notation (JSON) query string parameter to a specified Common Language Runtime (CLR) type.

ConvertValueToString(Object, Type) ConvertValueToString(Object, Type) ConvertValueToString(Object, Type) ConvertValueToString(Object, Type)

Serializes a Common Language Runtime (CLR) parameter type to a JavaScript Object Notation (JSON) representation.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to