@@ -40,7 +40,8 @@ export declare class DocumentSnapshot<AppModelType = DocumentData, DbModelType e
4040| --- | --- | --- |
4141| [data (options )](./firestore_ .documentsnapshot .md #documentsnapshotdata ) | | Retrieves all fields in the document as an <code >Object </code >. Returns <code >undefined </code > if the document doesn 't exist .<!-- -->By default , <code >serverTimestamp ()</code > values that have not yet been set to their final value will be returned as <code >null </code >. You can override this by passing an options object . |
4242| [exists ()](./firestore_ .documentsnapshot .md #documentsnapshotexists ) | | Returns whether or not the data exists . True if the document exists . |
43- | [fromJSON (db , json , converter )](./firestore_ .documentsnapshot .md #documentsnapshotfromjson ) | <code >static </code > | Builds a <code >DocumentSnapshot </code > instance from a JSON object created by [DocumentSnapshot .toJSON ()](./firestore_ .documentsnapshot .md #documentsnapshottojson )<!-- -->. |
43+ | [fromJSON (db , json )](./firestore_ .documentsnapshot .md #documentsnapshotfromjson ) | <code >static </code > | Builds a <code >DocumentSnapshot </code > instance from a JSON object created by [DocumentSnapshot .toJSON ()](./firestore_ .documentsnapshot .md #documentsnapshottojson )<!-- -->. |
44+ | [fromJSONUsingConverter (db , json , converter )](./firestore_ .documentsnapshot .md #documentsnapshotfromjsonusingconverter ) | <code >static </code > | Builds a <code >DocumentSnapshot </code > instance from a JSON object created by [DocumentSnapshot .toJSON ()](./firestore_ .documentsnapshot .md #documentsnapshottojson )<!-- -->. |
4445| [get (fieldPath , options )](./firestore_ .documentsnapshot .md #documentsnapshotget ) | | Retrieves the field specified by <code >fieldPath </code >. Returns <code >undefined </code > if the document or field doesn 't exist .<!-- -->By default , a <code >serverTimestamp ()</code > that has not yet been set to its final value will be returned as <code >null </code >. You can override this by passing an options object . |
4546| [toJSON ()](./firestore_ .documentsnapshot .md #documentsnapshottojson ) | | Returns a JSON -serializable representation of this <code >DocumentSnapshot </code > instance . |
4647
@@ -128,7 +129,7 @@ Builds a `DocumentSnapshot` instance from a JSON object created by [DocumentSnap
128129<b >Signature :</b >
129130
130131```typescript
131- static fromJSON < AppModelType , DbModelType extends DocumentData = DocumentData > (db : Firestore , json : object , converter ?: FirestoreDataConverter < AppModelType , DbModelType > | null ): DocumentSnapshot < AppModelType , DbModelType > ;
132+ static fromJSON (db : Firestore , json : object ): DocumentSnapshot ;
132133```
133134
134135#### Parameters
@@ -137,7 +138,30 @@ static fromJSON<AppModelType, DbModelType extends DocumentData = DocumentData>(d
137138| --- | --- | --- |
138139| db | [Firestore ](./firestore_ .firestore .md #firestore_class ) | |
139140| json | object | a JSON object represention of a <code >DocumentSnapshot </code > instance . |
140- | converter | [FirestoreDataConverter ](./firestore_ .firestoredataconverter .md #firestoredataconverter_interface )<!-- -->< ;AppModelType , DbModelType > ; \| null | Converts objects to and from Firestore . |
141+
142+ <b >Returns :</b >
143+
144+ [DocumentSnapshot ](./firestore_ .documentsnapshot .md #documentsnapshot_class )
145+
146+ an instance of [DocumentSnapshot ](./firestore_ .documentsnapshot .md #documentsnapshot_class ) if the JSON object could be parsed . Throws a [FirestoreError ](./firestore_ .firestoreerror .md #firestoreerror_class ) if an error occurs .
147+
148+ ## DocumentSnapshot .fromJSONUsingConverter ()
149+
150+ Builds a `DocumentSnapshot ` instance from a JSON object created by [DocumentSnapshot .toJSON ()](./firestore_ .documentsnapshot .md #documentsnapshottojson )<!-- -->.
151+
152+ <b >Signature :</b >
153+
154+ ```typescript
155+ static fromJSONUsingConverter <AppModelType , DbModelType extends DocumentData = DocumentData >(db : Firestore , json : object , converter : FirestoreDataConverter <AppModelType , DbModelType >): DocumentSnapshot <AppModelType , DbModelType >;
156+ ```
157+
158+ #### Parameters
159+
160+ | Parameter | Type | Description |
161+ | --- | --- | --- |
162+ | db | [Firestore ](./firestore_ .firestore .md #firestore_class ) | |
163+ | json | object | a JSON object represention of a <code >DocumentSnapshot </code > instance . |
164+ | converter | [FirestoreDataConverter ](./firestore_ .firestoredataconverter .md #firestoredataconverter_interface )<!-- -->< ;AppModelType , DbModelType > ; | Converts objects to and from Firestore . |
141165
142166<b >Returns :</b >
143167
0 commit comments