Searching for Go package to track changes and produce JSON patches

polaris · · 333 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I am porting over an application from NodeJS to Go and searching for a library that can help me track changes made to an object. These changes are specified by clients using the standard JSON patch, such as:</p> <p>{ &#34;op&#34;: &#34;replace&#34;, &#34;path&#34;: &#34;/a/b/c&#34;, &#34;value&#34;: 42 }</p> <p>Subscribed clients are later sent patches of the same structure. I&#39;m looking to be able to generate the patches, much like was done in the NodeJS module I used <a href="https://github.com/Starcounter-Jack/JSON-Patch" rel="nofollow">https://github.com/Starcounter-Jack/JSON-Patch</a>. This allows me to generate patches whenever I want, rather than just echoing patches that come in, which gives me control over throttling and batch processing of patches.</p> <p>This port is very early on in development, and I&#39;m open to any suggestions on how to represent the data in Go and track changes.</p> <hr/>**评论:**<br/><br/>outroot: <pre><p>Using <a href="http://go-search.org/search?q=json+patch" rel="nofollow">http://go-search.org/search?q=json+patch</a>, this popped up: <a href="https://github.com/evanphx/json-patch" rel="nofollow">https://github.com/evanphx/json-patch</a></p></pre>megromby: <pre><p>Pretty sure this will be of interest: <a href="https://github.com/jpillora/velox" rel="nofollow">https://github.com/jpillora/velox</a></p> <p>Demo: <a href="https://velox.jpillora.com/" rel="nofollow">https://velox.jpillora.com/</a></p></pre>nobillygreen: <pre><p>This is every interesting, but, as it says, doesn&#39;t support client side changes, which is the entire purpose of application. If it did, I&#39;d stop what I was doing all together and adopt this.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

333 次点击  
加入收藏 微博
0 回复
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传