Class: JSONAPISerializer
deprecated
since v0.17, remove in v0.18
Implements​
Serializer
<RecordDocument
,ResourceDocument
,JSONAPISerializationOptions
,JSONAPISerializationOptions
>
Constructors​
constructor​
• new JSONAPISerializer(settings
)
Parameters​
Name | Type |
---|---|
settings | JSONAPISerializerSettings |
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:64
Accessors​
keyMap​
• get
keyMap(): undefined
| RecordKeyMap
Returns​
undefined
| RecordKeyMap
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:100
schema​
• get
schema(): RecordSchema
Returns​
RecordSchema
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:96
serializerFor​
• get
serializerFor(): SerializerForFn
<Serializer
<unknown
, unknown
, unknown
, unknown
>>
Returns​
SerializerForFn
<Serializer
<unknown
, unknown
, unknown
, unknown
>>
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:104
Methods​
deserialize​
â–¸ deserialize(document
, options?
): RecordDocument
Parameters​
Name | Type |
---|---|
document | ResourceDocument |
options? | JSONAPISerializationOptions |
Returns​
Implementation of​
Serializer.deserialize
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:352
deserializeAtomicOperation​
â–¸ deserializeAtomicOperation(operation
): RecordOperation
Parameters​
Name | Type |
---|---|
operation | ResourceAtomicOperation |
Returns​
RecordOperation
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:430
deserializeAtomicOperations​
â–¸ deserializeAtomicOperations(operations
): RecordOperation
[]
Parameters​
Name | Type |
---|---|
operations | ResourceAtomicOperation [] |
Returns​
RecordOperation
[]
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:422
deserializeAtomicOperationsDocument​
â–¸ deserializeAtomicOperationsDocument(document
): RecordOperationsDocument
Parameters​
Name | Type |
---|---|
document | ResourceAtomicOperationsDocument |
Returns​
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:402
deserializeAttribute​
â–¸ deserializeAttribute(record
, attr
, value
, model
): void
Parameters​
Name | Type |
---|---|
record | InitializedRecord |
attr | string |
value | unknown |
model | ModelDefinition |
Returns​
void
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:519
deserializeAttributes​
â–¸ deserializeAttributes(record
, resource
, model
): void
Parameters​
Name | Type |
---|---|
record | InitializedRecord |
resource | Resource |
model | ModelDefinition |
Returns​
void
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:501
deserializeLinks​
â–¸ deserializeLinks(record
, resource
, model
): void
Parameters​
Name | Type |
---|---|
record | InitializedRecord |
resource | Resource |
model | ModelDefinition |
Returns​
void
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:603
deserializeMeta​
â–¸ deserializeMeta(record
, resource
, model
): void
Parameters​
Name | Type |
---|---|
record | InitializedRecord |
resource | Resource |
model | ModelDefinition |
Returns​
void
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:614
deserializeRelationship​
â–¸ deserializeRelationship(record
, relationship
, value
, model
): void
Parameters​
Name | Type |
---|---|
record | InitializedRecord |
relationship | string |
value | ResourceRelationship |
model | ModelDefinition |
Returns​
void
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:567
deserializeRelationships​
â–¸ deserializeRelationships(record
, resource
, model
): void
Parameters​
Name | Type |
---|---|
record | InitializedRecord |
resource | Resource |
model | ModelDefinition |
Returns​
void
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:549
deserializeResource​
â–¸ deserializeResource(resource
, primaryRecord?
): InitializedRecord
Parameters​
Name | Type |
---|---|
resource | Resource |
primaryRecord? | InitializedRecord |
Returns​
InitializedRecord
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:486
deserializeResourceIdentity​
â–¸ deserializeResourceIdentity(resource
, primaryRecord?
): InitializedRecord
Parameters​
Name | Type |
---|---|
resource | Resource |
primaryRecord? | InitializedRecord |
Returns​
InitializedRecord
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:436
recordAttribute​
â–¸ recordAttribute(type
, resourceAttribute
): string
Parameters​
Name | Type |
---|---|
type | string |
resourceAttribute | string |
Returns​
string
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:182
recordId​
â–¸ recordId(type
, resourceId
): string
Parameters​
Name | Type |
---|---|
type | string |
resourceId | string |
Returns​
string
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:150
recordIdentity​
â–¸ recordIdentity(resourceIdentity
): RecordIdentity
Parameters​
Name | Type |
---|---|
resourceIdentity | ResourceIdentity |
Returns​
RecordIdentity
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:176
recordRelationship​
â–¸ recordRelationship(type
, resourceRelationship
): string
Parameters​
Name | Type |
---|---|
type | string |
resourceRelationship | string |
Returns​
string
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:186
recordType​
â–¸ recordType(resourceType
): string
Parameters​
Name | Type |
---|---|
resourceType | string |
Returns​
string
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:172
resourceAttribute​
â–¸ resourceAttribute(type
, attr
): string
Parameters​
Name | Type |
---|---|
type | undefined | string |
attr | string |
Returns​
string
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:121
resourceId​
â–¸ resourceId(type
, id
): undefined
| string
Parameters​
Name | Type |
---|---|
type | string |
id | string |
Returns​
undefined
| string
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:136
resourceIdentity​
â–¸ resourceIdentity(identity
): Resource
Parameters​
Name | Type |
---|---|
identity | RecordIdentity |
Returns​
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:125
resourceIds​
â–¸ resourceIds(type
, ids
): (undefined
| string
)[]
Parameters​
Name | Type |
---|---|
type | string |
ids | string [] |
Returns​
(undefined
| string
)[]
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:132
resourceKey​
â–¸ resourceKey(type
): string
Parameters​
Name | Type |
---|---|
type | string |
Returns​
string
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:109
resourceRelationship​
â–¸ resourceRelationship(type
, relationship
): string
Parameters​
Name | Type |
---|---|
type | undefined | string |
relationship | string |
Returns​
string
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:117
resourceType​
â–¸ resourceType(type
): string
Parameters​
Name | Type |
---|---|
type | string |
Returns​
string
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:113
serialize​
â–¸ serialize(document
): ResourceDocument
Parameters​
Name | Type |
---|---|
document | RecordDocument |
Returns​
Implementation of​
Serializer.serialize
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:190
serializeAtomicOperation​
â–¸ serializeAtomicOperation(operation
): ResourceAtomicOperation
Parameters​
Name | Type |
---|---|
operation | RecordOperation |
Returns​
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:216
serializeAtomicOperations​
â–¸ serializeAtomicOperations(operations
): ResourceAtomicOperation
[]
Parameters​
Name | Type |
---|---|
operations | RecordOperation [] |
Returns​
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:208
serializeAtomicOperationsDocument​
â–¸ serializeAtomicOperationsDocument(document
): ResourceAtomicOperationsDocument
Parameters​
Name | Type |
---|---|
document | RecordOperationsDocument |
Returns​
ResourceAtomicOperationsDocument
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:200
serializeAttribute​
â–¸ serializeAttribute(resource
, record
, attr
, model
): void
Parameters​
Name | Type |
---|---|
resource | Resource |
record | InitializedRecord |
attr | string |
model | ModelDefinition |
Returns​
void
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:270
serializeAttributes​
â–¸ serializeAttributes(resource
, record
, model
): void
Parameters​
Name | Type |
---|---|
resource | Resource |
record | InitializedRecord |
model | ModelDefinition |
Returns​
void
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:258
serializeId​
â–¸ serializeId(resource
, record
, model
): void
Parameters​
Name | Type |
---|---|
resource | Resource |
record | RecordIdentity |
model | ModelDefinition |
Returns​
void
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:246
serializeIdentity​
â–¸ serializeIdentity(record
): Resource
Parameters​
Name | Type |
---|---|
record | InitializedRecord |
Returns​
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:239
serializeRecord​
â–¸ serializeRecord(record
): Resource
Parameters​
Name | Type |
---|---|
record | InitializedRecord |
Returns​
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:226
serializeRecords​
â–¸ serializeRecords(records
): Resource
[]
Parameters​
Name | Type |
---|---|
records | InitializedRecord [] |
Returns​
Resource
[]
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:222
serializeRelationship​
â–¸ serializeRelationship(resource
, record
, relationship
, model
): void
Parameters​
Name | Type |
---|---|
resource | Resource |
record | InitializedRecord |
relationship | string |
model | ModelDefinition |
Returns​
void
Defined in​
packages/@orbit/jsonapi/src/jsonapi-serializer.ts:319
serializeRelationships​
â–¸ serializeRelationships(resource
, record
, model
): void
Parameters​
Name | Type |
---|---|
resource | Resource |
record | InitializedRecord |
model | ModelDefinition |
Returns​
void