{"id":126229,"date":"2020-01-17T11:19:21","date_gmt":"2020-01-17T03:19:21","guid":{"rendered":"http:\/\/4563.org\/?p=126229"},"modified":"2020-06-29T03:21:43","modified_gmt":"2020-06-28T19:21:43","slug":"vue-toy-200-%e8%a1%8c%e4%bb%a3%e7%a0%81%e6%a8%a1%e6%8b%9f-vue-%e5%ae%9e%e7%8e%b0","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=126229","title":{"rendered":"vue-toy: 200 \u884c\u4ee3\u7801\u6a21\u62df Vue \u5b9e\u73b0"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  vue-toy: 200 \u884c\u4ee3\u7801\u6a21\u62df Vue \u5b9e\u73b0               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : nobo <\/span>  <span><i><\/i> 17<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<h1>vue-toy<\/h1>\n<p> <\/p>\n<p>200 \u884c\u5de6\u53f3\u4ee3\u7801\u6a21\u62df vue \u5b9e\u73b0\uff0c\u89c6\u56fe\u6e32\u67d3\u90e8\u5206\u4f7f\u7528<code>React<\/code>\u6765\u4ee3\u66ff<code>Snabbdom<\/code>\uff0c\u6b22\u8fce Star \u3002 \u9879\u76ee\u5730\u5740\uff1ahttps:\/\/github.com\/bplok20010\/vue-toy<\/p>\n<p>codesandbox \u793a\u4f8b<\/p>\n<p>\u5df2\u5b9e\u73b0\u7684\u53c2\u6570:<\/p>\n<pre><code>interface Options {     el: HTMLElement | string;  propsData?: Record&lt;string, any&gt;;  props?: string[];  name?: string;  data?: () =&gt; Record&lt;string, any&gt;;  methods?: Record&lt;string, (e: Event) =&gt; void&gt;;  computed?: Record&lt;string, () =&gt; any&gt;;  watch?: Record&lt;string, (newValue: any, oldValue: any) =&gt; any&gt;;  render: (h: typeof React.createElement) =&gt; React.ReactNode;  renderError?: (h: typeof React.createElement, error: Error) =&gt; React.ReactNode;  mounted?: () =&gt; void;  updated?: () =&gt; void;  destroyed?: () =&gt; void;  errorCaptured?: (e: Error, vm: React.ReactInstance) =&gt; void; } <\/code><\/pre>\n<p>\u793a\u4f8b\uff1a<\/p>\n<pre><code>import Vue from \"vue-toy\";  const Hello = Vue.component({  render(h){   return h('span', null, 'vue-toy') ;  } })  new Vue({   el: document.getElementById(\"root\"),   data() {     return {       msg: \"hello vue toy\"     };   },   render(h) {     return h(\"h1\", null, this.msg, h(Hello));   } }); <\/code><\/pre>\n<h2>\u57fa\u672c\u539f\u7406<\/h2>\n<p>\u5b98\u65b9\u539f\u7406\u56fe\uff1a <img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/06\/20200628_5ef8ed3e66752.png\" alt=\"vue-toy: 200 \u884c\u4ee3\u7801\u6a21\u62df Vue \u5b9e\u73b0\" \/> \u5b9e\u73b0\u57fa\u672c\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li>\u4f7f\u7528 Observable \u521b\u5efa\u89c2\u5bdf\u5bf9\u8c61<\/li>\n<li>\u5b9a\u4e49\u597d\u89c6\u56fe\u65e2 render \u51fd\u6570<\/li>\n<li>\u6536\u96c6\u89c6\u56fe\u4f9d\u8d56\uff0c\u5e76\u76d1\u542c\u4f9d\u8d56\u5c5e\u6027<\/li>\n<li>\u6e32\u67d3\u89c6\u56fe<\/li>\n<li>\u91cd\u590d 3-4<\/li>\n<\/ol>\n<pre><code>\/\/ \u521b\u5efa\u89c2\u5bdf\u5bf9\u8c61 \/\/ \u89c2\u5bdf\u5bf9\u8c61\u4e3b\u8981\u4f7f\u7528\u7684\u662f Object.defineProperty \u6216 Proxy \u6765\u5b9e\u73b0\uff0c const data = observable({     name: 'vue-toy', });  \/\/ \u6e32\u67d3\u6a21\u7248 const render = function(){     return &lt;h1&gt;{data.name}&lt;\/h1&gt; }  \/\/ \u8ba1\u7b97 render \u7684\u4f9d\u8d56\u5c5e\u6027\uff0c \/\/ \u4f9d\u8d56\u5c5e\u6027\u6539\u53d8\u65f6\uff0c\u4f1a\u91cd\u65b0\u8ba1\u7b97 computedFn\uff0c\u5e76\u6267\u884c\u76d1\u63a7\u51fd\u6570 watchFn\uff0c \/\/ \u5c5e\u6027\u4f9d\u8d56\u8ba1\u7b97\u4f7f\u7528\u6808\u53ca\u53ef\u4ee5\u4e86\u3002 \/\/ watch(computedFn, watchFn); watch(render, function(newVNode, oldVNode){     update(newVNode, mountNode); });  \/\/\u521d\u59cb\u6e32\u67d3 mount(render(), mountNode);  \/\/ \u6539\u53d8\u89c2\u5bdf\u5bf9\u8c61\u5c5e\u6027\uff0c\u5982\u679c render \u4f9d\u8d56\u4e86\u8be5\u5c5e\u6027\uff0c\u5219\u4f1a\u91cd\u65b0\u6e32\u67d3 data.name = 'hello vue toy'; <\/code><\/pre>\n<blockquote>\n<p>\u89c6\u56fe\u6e32\u67d3\u90e8\u5206(\u65e2 render)\u4f7f\u7528\u7684\u662f vdom \u6280\u672f\uff0cvue \u4f7f\u7528<code>Snabbdom<\/code>\u5e93\uff0c<code>vue-toy<\/code>\u4f7f\u7528\u7684\u662f<code>react<\/code>\u6765\u8fdb\u884c\u6e32\u67d3\uff0c\u6240\u4ee5\u5728 render \u51fd\u6570\u91cc\u4f60\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528 React \u7684 JSX \u8bed\u6cd5,\u4e0d\u8fc7\u522b\u5fd8\u8bb0<code>import React from 'react'<\/code>\uff0c\u5f53\u7136\u4e5f\u53ef\u4ee5\u4f7f\u7528<code>preact<\/code> <code>inferno<\/code> \u7b49 vdom \u5e93\u3002<\/p>\n<\/blockquote>\n<blockquote>\n<p>\u7531\u4e8e vue \u7684 template \u7684\u6700\u7ec8\u4e5f\u662f\u89e3\u6790\u5e76\u751f\u6210 render \u51fd\u6570\uff0c\u6a21\u7248\u7684\u89e3\u6790\u53ef\u7528<code>htmleParser<\/code>\u5e93\u6765\u751f\u6210<code>AST<\/code>\uff0c\u5269\u4e0b\u5c31\u662f\u89e3\u6790\u6307\u4ee4\u5e76\u751f\u4ea7\u4ee3\u7801\uff0c\u7531\u4e8e\u5de5\u4f5c\u91cf\u5927\uff0c\u8fd9\u91cc\u5c31\u4e0d\u5177\u4f53\u5b9e\u73b0\uff0c\u76f4\u63a5\u4f7f\u7528 jsx \u3002<\/p>\n<\/blockquote>\n<h2>\u54cd\u5e94\u5f0f\u5b9e\u73b0<\/h2>\n<p>\u4e00\u4e2a\u54cd\u5e94\u5f0f\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<pre><code>const data = Observable({  name: \"none\", });  const watcher =new Watch(  data,  function computed() {   return \"hello \" + this.name;  },  function listener(newValue, oldValue) {   console.log(\"changed:\", newValue, oldValue);  } ); \/\/ changed vue-toy none data.name = \"vue-toy\"; <\/code><\/pre>\n<h3>Observable \u5b9e\u73b0<\/h3>\n<p>\u6e90\u7801 \u89c2\u5bdf\u5bf9\u8c61\u521b\u5efa\u8fd9\u91cc\u4f7f\u7528 Proxy \u5b9e\u73b0\uff0c\u793a\u4f8b\uff1a<\/p>\n<pre><code>function Observable(data) {  return new Proxy(data, {   get(target, key) {    return target[key];   },   set(target, key, value) {    target[key] = value;    return true;   },  }); } <\/code><\/pre>\n<p>\u8fd9\u5c31\u5b8c\u6210\u4e86\u4e00\u4e2a\u5bf9\u8c61\u7684\u89c2\u5bdf\uff0c\u4f46\u4ee5\u4e0a\u793a\u4f8b\u4ee3\u7801\u867d\u7136\u80fd\u89c2\u5bdf\u5bf9\u8c61\uff0c\u4f46\u65e0\u6cd5\u5b9e\u73b0\u5bf9\u8c61\u5c5e\u6027\u6539\u52a8\u540e\u901a\u77e5\u89c2\u5bdf\u8005\uff0c\u8fd9\u65f6\u8fd8\u7f3a\u5c11 Watch \u5bf9\u8c61\u6765\u8ba1\u7b97\u89c2\u5bdf\u51fd\u6570\u7684\u5c5e\u6027\u4f9d\u8d56\u53ca Notify \u6765\u5b9e\u73b0\u5c5e\u6027\u53d8\u66f4\u65f6\u7684\u901a\u77e5\u3002<\/p>\n<h3>Watch \u5b9e\u73b0<\/h3>\n<p>\u6e90\u7801<\/p>\n<p>\u5b9a\u4e49\u5982\u4e0b\uff1a<\/p>\n<pre><code>Watch(data, computedFn, watchFn); <\/code><\/pre>\n<ul>\n<li>data \u4e3a computedFn \u7684 \u4e0a\u4e0b\u6587 \u65e2 <code>this<\/code> \u975e\u5fc5\u987b<\/li>\n<li>computedFn \u4e3a\u89c2\u5bdf\u51fd\u6570\u5e76\u8fd4\u56de\u89c2\u5bdf\u7684\u6570\u636e\uff0cWatch \u4f1a\u8ba1\u7b97\u51fa\u91cc\u9762\u7684\u4f9d\u8d56\u5c5e\u6027\u3002<\/li>\n<li>watchFn \u5f53 computedFn \u8fd4\u56de\u5185\u5bb9\u53d1\u751f\u6539\u53d8\u65f6\uff0cwatchFn \u4f1a\u88ab\u8c03\u7528\uff0c\u540c\u65f6\u63a5\u6536\u5230\u65b0\u3001\u65e7\u503c<\/li>\n<\/ul>\n<p>\u5927\u6982\u5b9e\u73b0\u5982\u4e0b\uff1a<\/p>\n<pre><code>\/\/ Watch.js \/\/ \u5f53\u524d\u6b63\u5728\u6536\u96c6\u4f9d\u8d56\u7684 Watch const CurrentWatchDep = {     current: null, }; class Watch {     constructor(data, exp, fn) {         this.deps = [];          this.watchFn = fn;         this.exp =  () =&gt; {                     return exp.call(data);                 };         \/\/ \u4fdd\u5b58\u4e0a\u4e00\u4e2a\u4f9d\u8d56\u6536\u96c6\u5bf9\u8c61         const lastWatchDep = CurrentWatchDep.current;         \/\/ \u8bbe\u7f6e\u5f53\u524d\u4f9d\u8d56\u6536\u96c6\u5bf9\u8c61         CurrentWatchDep.current = this;         \/\/ \u5f00\u59cb\u6536\u96c6\u4f9d\u8d56\uff0c\u5e76\u83b7\u53d6\u89c2\u5bdf\u51fd\u6570\u8fd4\u56de\u7684\u503c         this.last = this.exp();         \/\/ \u8fd8\u539f         CurrentWatchDep.current = lastWatchDep;     }     clearDeps() {         this.deps.forEach((cb) =&gt; cb());         this.deps = [];     }     \/\/ \u76d1\u542c\u4f9d\u8d56\u5c5e\u6027\u7684\u6539\u52a8\uff0c\u5e76\u4fdd\u5b58\u53d6\u6d88\u56de\u8c03     addDep(notify) {         \/\/ \u5f53\u4f9d\u8d56\u5c5e\u6027\u6539\u53d8\u65f6\uff0c\u91cd\u65b0\u89e6\u53d1\u4f9d\u8d56\u8ba1\u7b97         this.deps.push(notify.sub(() =&gt; {             this.check();         }));     }     \/\/ \u91cd\u65b0\u6267\u884c\u4f9d\u8d56\u8ba1\u7b97     check() {         \/\/ \u6e05\u7a7a\u6240\u6709\u4f9d\u8d56\uff0c\u91cd\u65b0\u8ba1\u7b97         this.clearDeps();         \/\/ \u4f5c\u7528\u540c\u6784\u9020\u51fd\u6570         const lastWatchDep = CurrentWatchDep.current;         CurrentWatchDep.current = this;         const newValue = this.exp();         CurrentWatchDep.current = lastWatchDep;         const oldValue = this.last;         \/\/ \u5bf9\u6bd4\u65b0\u65e7\u503c\u662f\u5426\u6539\u53d8         if (!shallowequal(oldValue, newValue)) {             this.last = newValue;             \/\/ \u8c03\u7528\u76d1\u542c\u51fd\u6570             this.watchFn(newValue, oldValue);         }     } }  <\/code><\/pre>\n<h3>Notify \u5b9e\u73b0<\/h3>\n<p>\u89c2\u5bdf\u5bf9\u8c61\u53d1\u751f\u6539\u53d8\u540e\u9700\u8981\u901a\u77e5\u76d1\u542c\u8005\uff0c\u6240\u4ee5\u8fd8\u9700\u8981\u5b9e\u73b0\u901a\u77e5\u8005 Notify\uff1a<\/p>\n<pre><code>class Notify {     constructor() {         this.listeners = [];     }     sub(fn) {         this.listeners.push(fn);         return () =&gt; {             const idx = this.listeners.indexOf(fn);             if (idx === -1)                 return;             this.listeners.splice(idx, 1);         };     }     pub() {         this.listeners.forEach((fn) =&gt; fn());     } } <\/code><\/pre>\n<h3>\u8c03\u6574 Observable<\/h3>\n<p>\u524d\u9762\u7684<code>Observable<\/code>\u592a\u7b80\u5355\u4e86\uff0c\u65e0\u6cd5\u5b8c\u6210\u5c5e\u6027\u8ba1\u7b97\u7684\u9700\u6c42\uff0c\u7ed3\u5408\u4e0a\u9762<code>Watch<\/code> <code>Notify<\/code>\u7684\u6765\u8c03\u6574\u4e0b Observable \u3002<\/p>\n<pre><code>function Observable(data) {  const protoListeners = Object.create(null);  \/\/ \u7ed9\u89c2\u5bdf\u6570\u636e\u7684\u6240\u6709\u5c5e\u6027\u521b\u5efa\u4e00\u4e2a Notify  each(data, (_, key) =&gt; {   protoListeners[key] = new Notify();  });  return new Proxy(data, {   get(target, key) {    \/\/ \u5c5e\u6027\u4f9d\u8d56\u8ba1\u7b97    if (CurrentWatchDep.current) {     const watcher = CurrentWatchDep.current;     watcher.addDep(protoListener[key]);    }    return target[key];   },   set(target, key, value) {    target[key] = value;    if (protoListeners[key]) {     \/\/ \u901a\u77e5\u6240\u6709\u76d1\u542c\u8005     protoListeners[key].pub();    }    return true;   },  }); } <\/code><\/pre>\n<p>\u597d\u4e86\uff0c\u89c2\u5bdf\u8005\u7684\u521b\u5efa\u548c\u8ba2\u9605\u90fd\u5b8c\u6210\u4e86\uff0c\u5f00\u59cb\u6a21\u62df Vue \u3002<\/p>\n<h2>\u6a21\u62df Vue<\/h2>\n<p><code>vue-toy<\/code> \u4f7f\u7528<code>React<\/code>\u6765\u5b9e\u73b0\u89c6\u56fe\u7684\u6e32\u67d3\uff0c\u6240\u4ee5 render \u51fd\u6570\u91cc\u5982\u679c\u4f7f\u7528 JSX \u5219\u9700\u8981\u5f15\u5165 React<\/p>\n<h3>\u51c6\u5907<\/h3>\n<p>\u65e2\u7136\u5df2\u7ecf\u5b9e\u73b0\u4e86 Observable \u548c Watch\uff0c\u90a3\u6211\u4eec\u5c31\u6765\u5b9e\u73b0\u57fa\u672c\u539f\u7406\u7684\u793a\u4f8b\uff1a<\/p>\n<p>codesandbox \u793a\u4f8b<\/p>\n<pre><code>import Observable from \"vue-toy\/cjs\/Observable\"; import Watch from \"vue-toy\/cjs\/Watch\";  function mount(vnode) {   console.log(vnode); }  function update(vnode) {   console.log(vnode); }  const data = Observable({   msg: \"hello vue toy!\",   counter: 1 });  function render() {   return `render: ${this.counter} | ${this.msg}`; }  new Watch(data, render, update);  mount(render.call(data));  setInterval(() =&gt; data.counter++, 1000); \/\/ \u5728\u63a7\u5236\u53f0\u53ef\u770b\u5230\u6bcf\u79d2\u7684\u8f93\u51fa\u4fe1\u606f <\/code><\/pre>\n<blockquote>\n<p>\u8fd9\u65f6\u5c06 mount update \u7684\u5b9e\u73b0\u6362\u6210 vdom \u5c31\u53ef\u4ee5\u5b8c\u6210\u4e00\u4e2a\u57fa\u672c\u7684\u6e32\u67d3\u3002<\/p>\n<\/blockquote>\n<p>\u4f46\u8fd9\u8fd8\u4e0d\u591f\uff0c\u6211\u4eec\u9700\u8981\u62bd\u8c61\u5e76\u5c01\u88c5\u6210\u7ec4\u4ef6\u6765\u7528\u3002<\/p>\n<h3>Component<\/h3>\n<p>\u6e90\u7801<\/p>\n<p>\u8fd9\u91cc\u7684 Component \u50cf\u662f React \u7684\u9ad8\u9636\u51fd\u6570 HOC\uff0c\u4f7f\u7528\u793a\u4f8b\uff1a<\/p>\n<pre><code>const Hello = Component({  props: [\"msg\"],  data() {   return {    counter: 1,   };  },  render(h) {   return h(\"h1\", null, this.msg, this.counter);  }, }); <\/code><\/pre>\n<p>\u5927\u6982\u5b9e\u73b0\u5982\u4e0b\uff0c<code>options<\/code> \u53c2\u8003\u6587\u7ae0\u5f00\u5934<\/p>\n<pre><code>function Component(options) {  return class extends React.Component {      \/\/ \u7701\u7565\u82e5\u5e72...   constructor(props) {    super(props);    \/\/ \u7701\u7565\u82e5\u5e72...    \/\/ \u521b\u5efa\u89c2\u5bdf\u5bf9\u8c61    this.$data = Observable({ ...propsData, ...methods, ...data }, computed);    \/\/ \u7701\u7565\u82e5\u5e72...    \/\/ \u8ba1\u7b97 render \u4f9d\u8d56\u5e76\u76d1\u542c    this.$watcher = new Watch(     this.$data,     () =&gt; {      return options.render.call(this, React.createElement);     },     debounce((children) =&gt; {       this.$children = children;      this.forceUpdate();     })    );    this.$children = options.render.call(this, React.createElement);   }   shouldComponentUpdate(nextProps) {    if (     !shallowequal(      pick(this.props, options.props || []),      pick(nextProps, options.props || [])     )    ) {     this.updateProps(nextProps);     this.$children = options.render.call(this, React.createElement);     return true;    }    return false;   }         \/\/ \u751f\u547d\u5468\u671f\u5173\u8054   componentDidMount() {    options.mounted?.call(this);   }    componentWillUnmount() {    this.$watcher.clearDeps();    options.destroyed?.call(this);   }    componentDidUpdate() {    options.updated?.call(this);   }    render() {    return this.$children;   }  }; } <\/code><\/pre>\n<h3>\u521b\u5efa\u4e3b\u51fd\u6570 Vue<\/h3>\n<p>\u6700\u540e\u521b\u5efa\u5165\u53e3\u51fd\u6570 Vue\uff0c\u5b9e\u73b0\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre><code>export default function Vue(options) {  const RootComponent = Component(options);  let el;  if (typeof el === \"string\") {   el = document.querySelector(el);  }   const props = {   ...options.propsData,   $el: el,  };   return ReactDOM.render(React.createElement(RootComponent, props), el); } Vue.component = Component; <\/code><\/pre>\n<p>\u597d\u4e86\uff0cVue \u7684\u57fa\u672c\u5b9e\u73b0\u5b8c\u6210\u4e86\u3002<\/p>\n<p>\u611f\u8c22\u9605\u8bfb\u3002<\/p>\n<p>\u6700\u540e\uff0c\u6b22\u8fce Star\uff1ahttps:\/\/github.com\/bplok20010\/vue-toy<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>4<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"2074496\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : nomedia <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u725b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2074497\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wensonsmith <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             Nice                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2074498\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : typetraits <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6240\u4ee5\u8fd9\u662f\u4e00\u4e2a Vue on React \u5417 <img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/06\/504J5BO2-28.png\" alt=\"vue-toy: 200 \u884c\u4ee3\u7801\u6a21\u62df Vue \u5b9e\u73b0\"> <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2074499\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : nobo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @typetraits \u4e0d\u662f\uff0c\u6587\u7ae0\u53ea\u662f\u7b80\u7b54\u62ff\u6765\u7528\u3002\u4e0d\u8fc7\u786e\u5b9e\u53ef\u4ee5\u8fd9\u4e48\u505a\uff0c\u4e22\u6389 template\uff0c\u5176\u4ed6\u4e0d\u53d8\uff0crender \u91cc\u5199 react \u7684 jsx \u6216 template \u7f16\u8bd1\u6210 react \u7684\u8bed\u6cd5\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>vue-toy: 200 \u884c\u4ee3\u7801\u6a21&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/126229"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=126229"}],"version-history":[{"count":1,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/126229\/revisions"}],"predecessor-version":[{"id":126231,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/126229\/revisions\/126231"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=126229"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=126229"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=126229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}