Skip to main content
Version: 0.17

Class: JSONAPISerializer

deprecated since v0.17, remove in v0.18

Implements​

Constructors​

constructor​

• new JSONAPISerializer(settings)

Parameters​

NameType
settingsJSONAPISerializerSettings

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​

NameType
documentResourceDocument
options?JSONAPISerializationOptions

Returns​

RecordDocument

Implementation of​

Serializer.deserialize

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:352


deserializeAtomicOperation​

â–¸ deserializeAtomicOperation(operation): RecordOperation

Parameters​

NameType
operationResourceAtomicOperation

Returns​

RecordOperation

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:430


deserializeAtomicOperations​

â–¸ deserializeAtomicOperations(operations): RecordOperation[]

Parameters​

NameType
operationsResourceAtomicOperation[]

Returns​

RecordOperation[]

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:422


deserializeAtomicOperationsDocument​

â–¸ deserializeAtomicOperationsDocument(document): RecordOperationsDocument

Parameters​

NameType
documentResourceAtomicOperationsDocument

Returns​

RecordOperationsDocument

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:402


deserializeAttribute​

â–¸ deserializeAttribute(record, attr, value, model): void

Parameters​

NameType
recordInitializedRecord
attrstring
valueunknown
modelModelDefinition

Returns​

void

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:519


deserializeAttributes​

â–¸ deserializeAttributes(record, resource, model): void

Parameters​

NameType
recordInitializedRecord
resourceResource
modelModelDefinition

Returns​

void

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:501


â–¸ deserializeLinks(record, resource, model): void

Parameters​

NameType
recordInitializedRecord
resourceResource
modelModelDefinition

Returns​

void

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:603


deserializeMeta​

â–¸ deserializeMeta(record, resource, model): void

Parameters​

NameType
recordInitializedRecord
resourceResource
modelModelDefinition

Returns​

void

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:614


deserializeRelationship​

â–¸ deserializeRelationship(record, relationship, value, model): void

Parameters​

NameType
recordInitializedRecord
relationshipstring
valueResourceRelationship
modelModelDefinition

Returns​

void

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:567


deserializeRelationships​

â–¸ deserializeRelationships(record, resource, model): void

Parameters​

NameType
recordInitializedRecord
resourceResource
modelModelDefinition

Returns​

void

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:549


deserializeResource​

â–¸ deserializeResource(resource, primaryRecord?): InitializedRecord

Parameters​

NameType
resourceResource
primaryRecord?InitializedRecord

Returns​

InitializedRecord

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:486


deserializeResourceIdentity​

â–¸ deserializeResourceIdentity(resource, primaryRecord?): InitializedRecord

Parameters​

NameType
resourceResource
primaryRecord?InitializedRecord

Returns​

InitializedRecord

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:436


recordAttribute​

â–¸ recordAttribute(type, resourceAttribute): string

Parameters​

NameType
typestring
resourceAttributestring

Returns​

string

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:182


recordId​

â–¸ recordId(type, resourceId): string

Parameters​

NameType
typestring
resourceIdstring

Returns​

string

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:150


recordIdentity​

â–¸ recordIdentity(resourceIdentity): RecordIdentity

Parameters​

NameType
resourceIdentityResourceIdentity

Returns​

RecordIdentity

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:176


recordRelationship​

â–¸ recordRelationship(type, resourceRelationship): string

Parameters​

NameType
typestring
resourceRelationshipstring

Returns​

string

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:186


recordType​

â–¸ recordType(resourceType): string

Parameters​

NameType
resourceTypestring

Returns​

string

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:172


resourceAttribute​

â–¸ resourceAttribute(type, attr): string

Parameters​

NameType
typeundefined | string
attrstring

Returns​

string

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:121


resourceId​

â–¸ resourceId(type, id): undefined | string

Parameters​

NameType
typestring
idstring

Returns​

undefined | string

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:136


resourceIdentity​

â–¸ resourceIdentity(identity): Resource

Parameters​

NameType
identityRecordIdentity

Returns​

Resource

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:125


resourceIds​

â–¸ resourceIds(type, ids): (undefined | string)[]

Parameters​

NameType
typestring
idsstring[]

Returns​

(undefined | string)[]

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:132


resourceKey​

â–¸ resourceKey(type): string

Parameters​

NameType
typestring

Returns​

string

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:109


resourceRelationship​

â–¸ resourceRelationship(type, relationship): string

Parameters​

NameType
typeundefined | string
relationshipstring

Returns​

string

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:117


resourceType​

â–¸ resourceType(type): string

Parameters​

NameType
typestring

Returns​

string

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:113


serialize​

â–¸ serialize(document): ResourceDocument

Parameters​

NameType
documentRecordDocument

Returns​

ResourceDocument

Implementation of​

Serializer.serialize

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:190


serializeAtomicOperation​

â–¸ serializeAtomicOperation(operation): ResourceAtomicOperation

Parameters​

NameType
operationRecordOperation

Returns​

ResourceAtomicOperation

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:216


serializeAtomicOperations​

â–¸ serializeAtomicOperations(operations): ResourceAtomicOperation[]

Parameters​

NameType
operationsRecordOperation[]

Returns​

ResourceAtomicOperation[]

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:208


serializeAtomicOperationsDocument​

â–¸ serializeAtomicOperationsDocument(document): ResourceAtomicOperationsDocument

Parameters​

NameType
documentRecordOperationsDocument

Returns​

ResourceAtomicOperationsDocument

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:200


serializeAttribute​

â–¸ serializeAttribute(resource, record, attr, model): void

Parameters​

NameType
resourceResource
recordInitializedRecord
attrstring
modelModelDefinition

Returns​

void

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:270


serializeAttributes​

â–¸ serializeAttributes(resource, record, model): void

Parameters​

NameType
resourceResource
recordInitializedRecord
modelModelDefinition

Returns​

void

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:258


serializeId​

â–¸ serializeId(resource, record, model): void

Parameters​

NameType
resourceResource
recordRecordIdentity
modelModelDefinition

Returns​

void

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:246


serializeIdentity​

â–¸ serializeIdentity(record): Resource

Parameters​

NameType
recordInitializedRecord

Returns​

Resource

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:239


serializeRecord​

â–¸ serializeRecord(record): Resource

Parameters​

NameType
recordInitializedRecord

Returns​

Resource

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:226


serializeRecords​

â–¸ serializeRecords(records): Resource[]

Parameters​

NameType
recordsInitializedRecord[]

Returns​

Resource[]

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:222


serializeRelationship​

â–¸ serializeRelationship(resource, record, relationship, model): void

Parameters​

NameType
resourceResource
recordInitializedRecord
relationshipstring
modelModelDefinition

Returns​

void

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:319


serializeRelationships​

â–¸ serializeRelationships(resource, record, model): void

Parameters​

NameType
resourceResource
recordInitializedRecord
modelModelDefinition

Returns​

void

Defined in​

packages/@orbit/jsonapi/src/jsonapi-serializer.ts:307