JsonExtensionsWriteNonNullPropertyT Method |
If the value is non null, this method will write the property name and the value as a name/value pair.
An error will be raised if the value cannot be written as a single JSON token.
Namespace:
RiakClient.Extensions
Assembly:
RiakClient (in RiakClient.dll) Version: f9bb17a3f8ff6940b88010a52f202e3d55fe25c5
Syntax public static JsonWriter WriteNonNullProperty<T>(
this JsonWriter writer,
string name,
T value
)
where T : class
[<ExtensionAttribute>]
static member WriteNonNullProperty :
writer : JsonWriter *
name : string *
value : 'T -> JsonWriter when 'T : not struct
Parameters
- writer
- Type: JsonWriter
The JsonWriter to write the property to. - name
- Type: SystemString
The name of the property. - value
- Type: T
The value of the property, writes a System.Object value.
Type Parameters
- T
- A reference type
Return Value
Type:
JsonWriterThe original JsonWriter, not modified but useful for call chaining.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
JsonWriter. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also