{"id":254449,"date":"2015-04-03T14:08:17","date_gmt":"2015-04-03T10:08:17","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=254449"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=254449","title":{"rendered":"Android Volley custom Loader"},"content":{"rendered":"<p>     \t\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0438\u0437\u043b\u043e\u0436\u0435\u043d \u043f\u043e\u0434\u0445\u043e\u0434 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Loader \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u043e\u0434\u043d\u043e\u043c Activity. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Volley. \u041c\u0435\u0442\u043e\u0434 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043a\u043e\u0433\u0434\u0430 \u0432 \u043e\u0434\u043d\u043e\u043c Activity \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0445\u0441\u044f \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432<\/p>\n<pre><code class=\"java\">public class MainActivity extends ActionBarActivity         implements LoaderManager.LoaderCallbacks&lt;DataHolder&gt;{     ...     @Override     public void onLoadFinished(Loader&lt;DataHolder&gt; loader, DataHolder data) {         if ( loader.getId() == DataLoader.LOADER_ICONS_ID ){            doIcons( data.getIcons() );         } else if( loader.getId() == DataLoader.LOADER_STYLES_ID ){            doStyles( data.getStyles() );         } else if( loader.getId() == DataLoader.LOADER_ICONSETS_ID ){            doIconSets( data.getIconSets() );         } <\/code><\/pre>\n<p>  <a name=\"habracut\"><\/a><br \/>  \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Fragment \u044d\u0442\u043e \u0442\u043e \u0447\u0442\u043e \u043e\u043d\u0438 \u00ab\u0436\u0438\u0432\u0443\u0442 \u0441\u0432\u043e\u0435\u0439 \u0436\u0438\u0437\u043d\u044c\u044e\u00bb (\u041f\u043e\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u043c\u0435\u043d\u044f \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a). \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u044d\u043a\u0440\u0430\u043d\u0430. \u041e\u0442\u0441\u044e\u0434\u0430 \u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0431\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 static newInstance(..)<\/p>\n<p>  <i>All subclasses of Fragment must include a public no-argument constructor. The framework will often re-instantiate a fragment class when needed, in particular during state restore, and needs to be able to find this constructor to instantiate it. If the no-argument constructor is not available, a runtime exception will occur in some cases during state restore. <br \/>  <\/i><br \/>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0443\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0441 \u043f\u043e\u043c\u043e\u0448\u044c\u044e Retrofit \u0438\u043b\u0438 Volley \u043d\u0435\u043b\u044c\u0437\u044f \u043d\u0430 \u0441\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043e\u0432 \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u0438\u0437 callback \u0432 \u043a\u0430\u043a\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 Activity \u0438 Fragment. \u0415\u0441\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0434\u043b\u044f FragmentManager, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043d\u043e \u044d\u0442\u043e \u043f\u043b\u043e\u0445\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"java\">\/\/ Resolved After Loader implementation if( !fragmentManager.isDestroyed() ) {    \/\/ Check problem after rotation screen <\/code><\/pre>\n<p>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 Loader. Feed \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0430 \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d <a href=\"http:\/\/iconfinder.com\">Iconfinder<\/a>. \u0421\u043a\u0430\u0436\u0443 \u0447\u0442\u043e feed \u043e\u0442\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u043a\u043e\u043b\u043e 100 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0430 \u043f\u043e\u0442\u043e\u043c \u0432\u0435\u0440\u043d\u0435\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430. \u0411\u044b\u043b\u0430 \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0441\u043b\u0443\u0436\u0431\u0443 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438, \u043d\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e. \u0427\u0435\u0440\u0435\u0437 ~5 \u0441\u0435\u043a\u0443\u043d\u0434 \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0438 \u0432\u043e\u0437\u043e\u0431\u043d\u043e\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0430 \u0441\u043e\u0439\u0434\u0435\u0442<\/p>\n<p>  \u0421\u0430\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 github <a href=\"https:\/\/github.com\/app-z\/Iconfinder\">Android Iconfinder demo<\/a><\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/875\/100\/d5d\/875100d5d646ef1024f63c81fc99c420.png\" alt=\"App-z.net\"\/><\/p>\n<p>  Loader \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:  <\/p>\n<pre><code class=\"java\">public class DataLoader extends Loader&lt;DataHolder&gt; {     public static final String ARGS_URL = &quot;url&quot;;     private String urlFeed;     private RequestQueue requestQueue;     private DataHolder dataHolder = new DataHolder();      public static final int LOADER_ICONS_ID = 1;     public static final int LOADER_STYLES_ID = 2;     public static final int LOADER_ICONSETS_ID = 3;      public DataLoader(Context context, Bundle bundle) {         super(context);         urlFeed = bundle.getString(ARGS_URL);         requestQueue = Volley.newRequestQueue(context);         \/\/ run only once         onContentChanged();     }      @Override     protected void onStartLoading() {         if (takeContentChanged())             forceLoad();     }      @Override     protected void onStopLoading() {         requestQueue.cancelAll(this);         super.onStopLoading();     }      @Override     protected void onReset() {         requestQueue.cancelAll(this);         super.onReset();     }      @Override     public void onForceLoad() {         super.onForceLoad();         if( getId() == LOADER_STYLES_ID )             doStylesRequest();         else if ( getId() == LOADER_ICONS_ID )             doIconsRequest();         else if ( getId() == LOADER_ICONSETS_ID )             doIconsetsRequest();     }      private void doIconsetsRequest() {         final GsonRequest gsonRequest = new GsonRequest(urlFeed, Iconsets.class, null, new Response.Listener&lt;Iconsets&gt;() {             @Override             public void onResponse(Iconsets iconsets) {                 dataHolder.setIconsets(iconsets);                 deliverResult(dataHolder);             }         ...     }     void doStylesRequest(){       ...     }     void  doIconsRequest(){       ...     } } <\/code><\/pre>\n<p>  \u0415\u0441\u0442\u044c \u043c\u043e\u043c\u0435\u043d\u0442. \u0412\u0435\u0440\u043d\u0443\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0440\u0430\u0437\u0443 \u0438\u0437 callback Volley \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0438\u043b\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0435\u0435 \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0430 \u043b\u0435\u0442\u0443 DataHolder \u0434\u043b\u044f deliverResult, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u0435\u043d \u0438\u043c\u0435\u043d\u043d\u043e \u0447\u043b\u0435\u043d \u043a\u043b\u0430\u0441\u0441\u0430 DataHolder \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u044b<br \/>  \u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u043e requestQueue.cancelAll(this); \u043a\u043e\u0433\u0434\u0430 Loader \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443<br \/>  \u0422\u0430\u043a\u0436\u0435 \u0434\u043b\u044f Volley \u0441\u0434\u0435\u043b\u0430\u043d\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043e\u0431\u0435\u0440\u0442\u043a\u0430 GsonRequest<\/p>\n<p>  \u041d\u043e \u0438 \u044d\u0442\u043e \u0435\u0449\u0435 \u043d\u0435 \u0432\u0441\u0435. \u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 onLoadFinished \u0441\u0440\u0430\u0437\u0443 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c Fragment \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f. \u041f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0447\u0435\u0440\u0435\u0437 Handler. \u041d\u0430 stackoverflow \u043f\u0438\u0448\u0443\u0442 \u043e \u0431\u0430\u0433\u0435 \u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Handler<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">    final int ICONS_HANDLER = 1;     final int STILES_HANDLER = 2;     final int ICONSETS_HANDLER = 3;      @Override     public void onLoadFinished(Loader&lt;DataHolder&gt; loader, DataHolder data) {         if(data == null ) {             \/\/ In Loader happened error             AppUtils.showDialog(MainActivity.this, &quot;Error&quot;, &quot;Server request error. Try again later&quot;, false);             return;         }          Message msg = mHandler.obtainMessage();         Bundle b = new Bundle();         if(loader.getId() == DataLoader.LOADER_ICONS_ID){             offset += count;    \/\/ Prepare for next lazy load             b.putParcelable(&quot;Icons&quot;, data.getIcons());             msg.what = ICONS_HANDLER;         } else if(loader.getId() == DataLoader.LOADER_STYLES_ID){             b.putParcelable(&quot;Styles&quot;, data.getStyles());             msg.what = STILES_HANDLER;         } else if(loader.getId() == DataLoader.LOADER_ICONSETS_ID){             b.putParcelable(&quot;IconSets&quot;, data.getIconSets());             msg.what = ICONSETS_HANDLER;         }         msg.setData(b);         mHandler.sendMessage(msg);     }      final Handler mHandler = new Handler(){         public void handleMessage(Message msg) {             Bundle b;             b=msg.getData();             if(msg.what == ICONS_HANDLER){                 Icons icons = b.getParcelable(&quot;Icons&quot;);                 fillIcons(icons);             } else if(msg.what == STILES_HANDLER){                 Styles styles = b.getParcelable(&quot;Styles&quot;);                 fillStyles(styles);             } else if(msg.what == ICONSETS_HANDLER){                 Iconsets iconSets = b.getParcelable(&quot;IconSets&quot;);                 fillIconSets(iconSets);             }             super.handleMessage(msg);         }     }; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412 MainActivity onStop () \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438:  <\/p>\n<pre><code class=\"java\">private void destroyLoaders(){      LoaderManager loaderManager = getSupportLoaderManager();      loaderManager.destroyLoader(DataLoader.LOADER_ICONS_ID);      loaderManager.destroyLoader(DataLoader.LOADER_ICONSETS_ID);      loaderManager.destroyLoader(DataLoader.LOADER_STYLES_ID);     }     @Override     protected void onStop () {         super.onStop();         destroyLoaders();     ... <\/code><\/pre>\n<p>  \u0412\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u044b\u0435. \u0412 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0438\u043f\u043e\u0432\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <\/p>\n<pre><code class=\"java\">Class&lt;T&gt; clazz;<\/code><\/pre>\n<p>  \u041f\u043e\u0432\u0442\u043e\u0440\u044e\u0441\u044c, \u043f\u043e\u043b\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043d\u0430 github <a href=\"https:\/\/github.com\/app-z\/Iconfinder\">Android Iconfinder demo<\/a>. Api iconfinder <a href=\"https:\/\/developer.iconfinder.com\/api\/2.0\/index.html\">Api 2.0<\/a><\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u043e\u0434\u043d\u0438\u043c Activity \u0438 \u00ab\u0431\u0443\u0442\u0435\u0440\u0431\u0440\u043e\u0434\u043e\u043c\u00bb \u0438\u0437 Fragments \u0441 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u043c \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0430<\/p>\n<p>  \u0421\u043f\u0438\u0441\u043e\u043a \u043b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u044b:<br \/>  <a href=\"http:\/\/developer.android.com\/reference\/android\/content\/Loader.html\">Loader<\/a><br \/>  <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Fragment.html\">Fragment<\/a><br \/>  <a href=\"http:\/\/www.androiddesignpatterns.com\/2012\/08\/implementing-loaders.html\">Implementing Loaders<\/a>     \t<\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/254801\/\"> http:\/\/habrahabr.ru\/post\/254801\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>     \t\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0438\u0437\u043b\u043e\u0436\u0435\u043d \u043f\u043e\u0434\u0445\u043e\u0434 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Loader \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u043e\u0434\u043d\u043e\u043c Activity. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Volley. \u041c\u0435\u0442\u043e\u0434 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043a\u043e\u0433\u0434\u0430 \u0432 \u043e\u0434\u043d\u043e\u043c Activity \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0445\u0441\u044f \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432<\/p>\n<pre><code class=\"java\">public class MainActivity extends ActionBarActivity         implements LoaderManager.LoaderCallbacks&lt;DataHolder&gt;{     ...     @Override     public void onLoadFinished(Loader&lt;DataHolder&gt; loader, DataHolder data) {         if ( loader.getId() == DataLoader.LOADER_ICONS_ID ){            doIcons( data.getIcons() );         } else if( loader.getId() == DataLoader.LOADER_STYLES_ID ){            doStyles( data.getStyles() );         } else if( loader.getId() == DataLoader.LOADER_ICONSETS_ID ){            doIconSets( data.getIconSets() );         } <\/code><\/pre>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-254449","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/254449","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=254449"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/254449\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=254449"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=254449"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=254449"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}