Click or drag to resize

JsonSerializer Class

Helper class for building Javascript JSON (JavaScript Object Notation) AJAX responses.
Inheritance Hierarchy

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public class JsonSerializer

The JsonSerializer type exposes the following members.

Constructors
  NameDescription
Public methodJsonSerializer
Constructor.
Top
Methods
  NameDescription
Public methodAdd(String, StringCollection)
Add a StringCollection to the object as a string array.
Public methodAdd(String, Enum)
Add an enum property to the object converting the enum value to an int.
Public methodAdd(String, Int32)
Add an int property to the object.
Public methodAdd(String, String)
Add a string property to the object.
Public methodAdd(String, String)
Add a string array property to the object.
Public methodAdd(String, Boolean, Boolean)
Add a boolean property to the object converting the bool value to javascript true/false keywords or 1/0 integers depending on the value of asOneOrZero. The default is true/false.
Public methodAddHtml
Add a block of HTML as a property of the object. Note that HTML requires special escaping including removal of CR and LF characters. Such escaping is performed by this method and the call should NOT so escape the HTML.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodStatic memberError
Create and populate a standard platform JSON error object of type "error".
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Generate the javascript expression defining the JSON object.
(Overrides ObjectToString.)
Top
Extension Methods
  NameDescription
Public Extension MethodEqualValue
Determines if the object value is equal to another object. If the two objects are null, then this returns true. There is special handling for guid comparisons (since a guid could be a string formatted in up to 3 different ways). If the special guid handling is not performed, then the object.Equals method is used.
(Defined by EAPUtil.)
Top
See Also