TcHmiJsonSerializer Class
Provides methods to serialize instances of any type from the TcHmiSrv.Core namespace to JSON Strings and back.
Inheritance Hierarchy
SystemObject
JsonSerializer
TcHmiSrv.Core.Tools.Json.NewtonsoftTcHmiJsonSerializer
Namespace: TcHmiSrv.Core.Tools.Json.Newtonsoft
Assembly: TcHmiSrvExtNet.Core (in
TcHmiSrvExtNet.Core.dll) Version:
3.1.7447.0+85f9b473a1dd11b8f3e5c9a182fd1901975e46f9
Syntax
C#
public class TcHmiJsonSerializer : JsonSerializerThe TcHmiJsonSerializer type exposes the following members.
Constructors
|
|
Name |
Description |
|---|---|---|
|
|
Initializes a new instance of the TcHmiJsonSerializer class |
Properties
|
|
Name |
Description |
|---|---|---|
|
|
Gets a JsonConverterCollection that contains the default JsonConverter s with advanced conversions enabled. | |
|
|
Binder |
Gets or sets the SerializationBinder used by the serializer when
resolving type names. |
|
|
CheckAdditionalContent |
Gets a value indicating whether there will be a check for
additional JSON content after deserializing an object. The default
value is false. |
|
|
ConstructorHandling |
Gets or sets how constructors are used during deserialization.
The default value is Default. |
|
|
Context |
Gets or sets the StreamingContext used
by the serializer when invoking serialization callback
methods. |
|
|
ContractResolver |
Gets or sets the contract resolver used by the serializer when
serializing .NET objects to JSON and vice versa. |
|
|
Converters |
Gets a collection JsonConverter
that will be used during serialization. |
|
|
Culture |
Gets or sets the culture used when reading JSON. The default
value is InvariantCulture. |
|
|
DateFormatHandling |
Gets or sets how dates are written to JSON text. The default
value is IsoDateFormat. |
|
|
DateFormatString |
Gets or sets how DateTime and DateTimeOffset values
are formatted when writing JSON text, and the expected date format
when reading JSON text. The default value is "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK". |
|
|
DateParseHandling |
Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when
reading JSON. The default value is DateTime. |
|
|
DateTimeZoneHandling |
Gets or sets how DateTime time zones are
handled during serialization and deserialization. The default value
is RoundtripKind. |
|
|
Gets a JsonConverterCollection that
contains the default JsonConverter s
with advanced conversions enabled. | |
|
|
Gets a JsonConverterCollection that contains the default JsonConverter s. | |
|
|
Gets the default JsonSerializerSettings . | |
|
|
Gets the default JsonSerializerSettings with the AdvancedJsonConverters. | |
|
|
Gets the default JsonSerializerSettings with the DefaultJsonConverters. | |
|
|
Gets the default JsonSerializerSettings with the DefaultJsonConverters. | |
|
|
DefaultValueHandling |
Gets or sets how default values are handled during
serialization and deserialization. The default value is
Include. |
|
|
Gets or sets how durations are read from and written to JSON
text. | |
|
|
Gets or sets how TimeSpan values are
formatted when writing JSON text and the expected duration format
when reading JSON text. | |
|
|
Gets or sets how duration formatted Strings are parsed when
reading JSON. | |
|
|
EqualityComparer |
Gets or sets the equality comparer used by the serializer when
comparing references. |
|
|
FloatFormatHandling |
Gets or sets how special floating point numbers, e.g. NaN, PositiveInfinity and
NegativeInfinity, are
written as JSON text. The default value is String. |
|
|
FloatParseHandling |
Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are
parsed when reading JSON text. The default value is Double. |
|
|
Formatting |
Indicates how JSON text output is formatted. The default value
is None. |
|
|
Gets or sets how values of type Int64 and UInt64 are parsed when
writing JSON. | |
|
|
MaxDepth |
Gets or sets the maximum depth allowed when reading JSON.
Reading past this depth will throw a JsonReaderException. A null value means there is no
maximum. The default value is 64. |
|
|
MetadataPropertyHandling |
Gets or sets how metadata properties are used during
deserialization. The default value is Default. |
|
|
MissingMemberHandling |
Gets or sets how missing members (e.g. JSON contains a property
that isn't a member on the object) are handled during
deserialization. The default value is Ignore. |
|
|
NullValueHandling |
Gets or sets how null values are handled during serialization
and deserialization. The default value is Include. |
|
|
ObjectCreationHandling |
Gets or sets how objects are created during deserialization.
The default value is Auto. |
|
|
PreserveReferencesHandling |
Gets or sets how object references are preserved by the
serializer. The default value is None. |
|
|
ReferenceLoopHandling |
Gets or sets how reference loops (e.g. a class referencing
itself) is handled. The default value is Error. |
|
|
ReferenceResolver |
Gets or sets the IReferenceResolver
used by the serializer when resolving references. |
|
|
SerializationBinder |
Gets or sets the ISerializationBinder used by the serializer when
resolving type names. |
|
|
StringEscapeHandling |
Gets or sets how strings are escaped when writing JSON text.
The default value is Default. |
|
|
TraceWriter |
Gets or sets the ITraceWriter used
by the serializer when writing trace messages. |
|
|
TypeNameAssemblyFormat |
Gets or sets how a type name assembly is written and resolved
by the serializer. The default value is Simple. |
|
|
TypeNameAssemblyFormatHandling |
Gets or sets how a type name assembly is written and resolved
by the serializer. The default value is Simple. |
|
|
TypeNameHandling |
Gets or sets how type name writing and reading is handled by
the serializer. The default value is None. |
Methods
|
|
Name |
Description |
|---|---|---|
|
|
Creates a new TcHmiJsonSerializer instance. The TcHmiJsonSerializer will not use default settings from DefaultSettings. | |
|
|
Creates a new TcHmiJsonSerializer instance using the specified JsonSerializerSettings . The TcHmiJsonSerializer will not use default settings from DefaultSettings. | |
|
|
Creates a new TcHmiJsonSerializer instance. The TcHmiJsonSerializer will use default settings from DefaultSettings. | |
|
|
Creates a new TcHmiJsonSerializer instance using the specified JsonSerializerSettings . The TcHmiJsonSerializer will use default settings from DefaultSettings as well as the specified JsonSerializerSettings . | |
|
|
Deserializes the JSON String contained by the specified JsonReader to an equivalent instance of the specified Type. | |
|
|
Deserializes the specified JSON String to an equivalent instance of the specified Type. | |
|
|
Deserialize(TextReader, Type) |
Deserializes the JSON structure contained by the specified
TextReader into an
instance of the specified type. |
|
|
Deserializes the JSON String contained by the specified JsonReader to an equivalent instance of the specified Type. | |
|
|
Deserializes the JSON String contained by the specified JsonReader to an equivalent instance of the specified Type. | |
|
|
Deserializes the specified JSON String to an equivalent instance of the specified Type. | |
|
|
Deserializes the specified JSON String to an equivalent instance of the specified Type. | |
|
|
Deserializes the JSON String contained by the specified JsonReader to an equivalent instance of the specified type. | |
|
|
Deserializes the specified JSON String to an equivalent instance of the specified type. | |
|
|
Deserializes the specified JSON String to an equivalent instance of the specified type using the specified JsonConverter{T} . | |
|
|
Deserializes the JSON String contained by the specified JsonReader to an equivalent instance of the specified type. | |
|
|
Deserializes the JSON String contained by the specified JsonReader to an equivalent instance of the specified type. | |
|
|
Deserializes the specified JSON String to an equivalent instance of the specified type. | |
|
|
Deserializes the specified JSON String to an equivalent instance of the specified type. | |
|
|
Deserializes the specified JSON String to an equivalent instance of the specified type using the specified JsonConverter{T} . | |
|
|
Determines whether the specified object is equal to the current
object. | |
|
|
Allows an object to try to free resources and perform other
cleanup operations before it is reclaimed by garbage
collection. | |
|
|
Serves as the default hash function. | |
|
|
Gets the Type of the current
instance. | |
|
|
Creates a shallow copy of the current Object. | |
|
|
Populate(JsonReader, Object) |
Populates the JSON values onto the target object. |
|
|
Populate(TextReader, Object) |
Populates the JSON values onto the target object. |
|
|
Serializes the specified Object to an equivalent JSON String. | |
|
|
Serialize(JsonWriter, Object) |
Serializes the specified Object and writes the JSON
structure using the specified JsonWriter. |
|
|
Serializes the specified Object to an equivalent JSON String using the specified JsonSerializerSettings . | |
|
|
Serializes the specified Object to an equivalent JSON String. | |
|
|
Serialize(TextWriter, Object) |
Serializes the specified Object and writes the JSON
structure using the specified TextWriter. |
|
|
Serializes the specified Object to an equivalent JSON String using the specified capacity and JsonSerializerSettings . | |
|
|
Serialize(JsonWriter, Object, Type) |
Serializes the specified Object and writes the JSON
structure using the specified JsonWriter. |
|
|
Serializes the specified Object to an equivalent JSON String using the specified JsonWriter , Type and JsonSerializerSettings . | |
|
|
Serializes the specified Object to an equivalent JSON String using the specified JsonWriter , Type and JsonSerializerSettings . | |
|
|
Serializes the specified Object to an equivalent JSON String. | |
|
|
Serializes the specified Object to an equivalent JSON String using the specified Type and JsonSerializerSettings . | |
|
|
Serialize(TextWriter, Object, Type) |
Serializes the specified Object and writes the JSON
structure using the specified TextWriter. |
|
|
Serializes the specified Object to an equivalent JSON String using the specified capacity, Type and JsonSerializerSettings . | |
|
|
Serializes the specified Object to an equivalent JSON String using the specified JsonWriter , Type and JsonSerializerSettings . | |
|
|
Serializes the specified Object to an equivalent JSON String using the specified JsonWriter , Type and JsonSerializerSettings . | |
|
|
Serializes the specified value to an equivalent JSON String using the specified JsonConverter{T} . | |
|
|
Serializes the specified value to an equivalent JSON String using the specified JsonConverter{T} . | |
|
|
Serializes the specified value to an equivalent JSON String using the specified JsonConverter{T} . | |
|
|
Serializes the specified value to an equivalent JSON String using the specified JsonConverter{T} . | |
|
|
Returns a string that represents the current object. |
Events
|
|
Name |
Description |
|---|---|---|
|
|
Error |
Occurs when the JsonSerializer
errors during serialization and deserialization. |
Fields
|
|
Name |
Description |
|---|---|---|
|
|
Contains the default capacity of StringBuilders that are used to create a JSON String. |
Version Information
Supported in: 3.1.7447.0, 2.3.7447.0, 1.10.7447.0
Reference
TcHmiSrv.Core.Tools.Json.Newtonsoft Namespace
Copyright © Beckhoff Automation GmbH & Co. KG