ARecord..::..FromJson Method (String, String, String, String, String, ANamespaceAccess, Boolean, Boolean)
Given a Json string, creates a ARecord object that can but used to update the DB.
Namespace:
Aerospike.Database.LINQPadDriver.ExtensionsAssembly: Aerospike.Database.LINQPadDriver (in Aerospike.Database.LINQPadDriver.dll)
Syntax
Parameters
- nameSpace
- Type: String
The associated namespace of the set
- setName
- Type: String
The associated Set of the record
- json
- Type: String
- pkPropertyName
- Type: String
The property name used to obtain the primary key. This must be a top level field (cannot be nested). The default is '_id'. If the pkPropertyName doesn's exists, a KeyNotFoundException is thrown.
- jsonBinName
- Type: String
If provided, the Json object is placed into this bin. If null (default), the each top level Json property will be associated with a bin. Note, if the property name is greater than the bin name limit, an Aerospike exception will occur during the put.
- setAccess
- Type: Aerospike.Database.LINQPadDriver.Extensions..::..ANamespaceAccess
The set instance that will be associated to this record.
- writePKPropertyName
- Type: Boolean
If true, the pkPropertyName, is written to the record. If false (default), it will not be part of the record (only used to define the PK).
- treatEmptyStrAsNull
- Type: Boolean
If true, default, these properties with an empty string value will be considered null (bin not saved). If false, these properties with an empty string value will have a bin value of empty string.
Return Value
Returns ARecord instance.Exceptions
Exception | Condition |
---|---|
KeyNotFoundException | Thrown if the pkPropertyName is not found as a top-level field. |
Remarks
C#
$date
C#
$datetime
C#
"bucket_start_date": "$date": { "$numberLong": "1545886800000"}}
C#
$datetimeoffset
C#
"bucket_start_datetimeoffset": "$datetimeoffset": { "$numberLong": "1545886800000"}}
C#
$timespan
C#
"bucket_start_time": "$timespan": { "$numberLong": "1545886800000"}}
C#
$timestamp
C#
$guid
C#
$uuid
C#
$guid
C#
$uuid
C#
$numeric
C#
$numberint64
C#
$numberlong
C#
$long
C#
$numberint32
C#
$numberint
C#
$int
C#
$numberdecimal
C#
$decimal
C#
$numberdouble
C#
$double
C#
$numberfloat
C#
$single
C#
$float
C#
$numberint16
C#
$numbershort
C#
$short
C#
$numberuint32
C#
$numberuint
C#
$uint
C#
$numberuint64
C#
$numberulong
C#
$ulong
C#
$numberuint16
C#
$numberushort
C#
$ushort
C#
$bool
C#
$boolean
C#
$type