mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
1.1 KiB
1.1 KiB
Home > kibana-plugin-plugins-data-public > SearchSource > serialize
SearchSource.serialize() method
Serializes the instance to a JSON string and a set of referenced objects. Use this method to get a representation of the search source which can be stored in a saved object.
The references returned by this function can be mixed with other references in the same object, however make sure there are no name-collisions. The references will be named kibanaSavedObjectMeta.searchSourceJSON.index
and kibanaSavedObjectMeta.searchSourceJSON.filter[<number>].meta.index
.
Using createSearchSource
, the instance can be re-created.
Signature:
serialize(): {
searchSourceJSON: string;
references: SavedObjectReference[];
};
Returns:
{ searchSourceJSON: string; references: SavedObjectReference[]; }