<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Interface: SerializerAPI</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Interface: SerializerAPI</h1> <section> <header> <h2>SerializerAPI</h2> <div class="class-description">API class for the Dashboard Serializer feature, which allows the generation of a JS object representing the dashboard.</div> </header> <article> <div class="container-overview"> <dl class="details"> </dl> <h3>Example</h3> <pre class="prettyprint"><code>dashboard.getFeature('Serializer')</code></pre> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="toJSON"><span class="type-signature"></span>toJSON<span class="signature">(options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {object}</span></h4> <div class="description"> Calling this method builds and return a JS object representing the current dashboard. If given a list of content IDs, a minimum dashboard spec (containing the specified IDs) will be returned. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>options</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">Options used to generate a dashboard spec. <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>contentIds</code></td> <td class="type"> <span class="param-type">Array</span> </td> <td class="description last">List of content IDs</td> </tr> <tr> <td class="name"><code>dashboardFeatures</code></td> <td class="type"> <span class="param-type">Array</span> </td> <td class="description last">List of dashboard features to include in the spec, include all features by default.</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Returns:</h5> <div class="param-desc"> JS object representing the current dashboard </div> <dl> <dt> Type </dt> <dd> <span class="param-type">object</span> </dd> </dl> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AppFactory.html">AppFactory</a></li></ul><h3>Interfaces</h3><ul><li><a href="CanvasAPI.html">CanvasAPI</a></li><li><a href="ContentAPI.html">ContentAPI</a></li><li><a href="ContentStoreAPI.html">ContentStoreAPI</a></li><li><a href="DashboardCoreAPI.html">DashboardCoreAPI</a></li><li><a href="DashboardPreferencesAPI.html">DashboardPreferencesAPI</a></li><li><a href="DashboardSettingsAPI.html">DashboardSettingsAPI</a></li><li><a href="PropertiesAPI.html">PropertiesAPI</a></li><li><a href="RendererAPI.html">RendererAPI</a></li><li><a href="SaveAPI.html">SaveAPI</a></li><li><a href="SerializerAPI.html">SerializerAPI</a></li><li><a href="StateAPI.html">StateAPI</a></li><li><a href="TransactionAPI.html">TransactionAPI</a></li><li><a href="UserProfileAPI.html">UserProfileAPI</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Thu May 05 2022 17:56:07 GMT+0000 (UTC) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>