Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

SqlJson Class

Definition

Namespace:
Microsoft.Data.SqlTypes
Assembly:
Microsoft.Data.SqlClient.dll
Package:
Microsoft.Data.SqlClient v6.0.2
Package:
Microsoft.Data.SqlClient v6.1.3
Package:
Microsoft.Data.SqlClient v7.0.1
Source:
SqlJson.cs
Source:
SqlJson.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Represents the JSON datatype in SQL Server.

public ref class SqlJson : System::Data::SqlTypes::INullable
public class SqlJson : System.Data.SqlTypes.INullable
type SqlJson = class
 interface INullable
Public Class SqlJson
Implements INullable
Inheritance
SqlJson
Implements

Constructors

Name Description
SqlJson()

Construct a new instance of the SqlJson class which represents a null JSON value.

SqlJson(JsonDocument)

Construct a new instance of the SqlJson class with a JsonDocument. The serialized JSON string from the document is saved.

SqlJson(String)

Construct a new instance of the SqlJson class with a serialized JSON String. The string is validated by parsing it with JsonDocument.

Properties

Name Description
IsNull

Indicates whether a structure is null. This property is read-only.

Null

Represents a null instance of the SqlJson type. This instance is equivalent to calling the parameterless constructor, or calling the other constructors with a null value.

Value

Gets the serialized JSON string of this SqlJson instance.

Methods

Name Description
ToString()

Returns the serialized JSON string, or null.

Applies to