将pouchDB与json数据同步 [英] synchronizing pouchDB with json data
问题描述
我想创建一个HTML页面,该页面将JSON数据与邮袋Db同步. JSON数据是来自Web服务的响应.我创建了一个示例html文件,该文件可以创建一个邮袋Db数据库.我还创建了其余Web服务,它提供了某些数据作为响应.谁能帮我同步这两个.
I want to create a html page which synchronize JSON data with pouch Db. The JSON data is a response from a web service.I have created a sample html file which can create a pouch Db database.I have created rest web service which gives certain data as response. can any one help me to synchronize these two.
推荐答案
PouchDB具有内置方法使用单向或双向复制与 CouchDB 进行同步.
PouchDB has a built in method for synchronizing with CouchDB using one- or two-way replication.
我知道您想与一个没有CouchDB兼容API的数据源进行同步.然后,您必须编写代码来执行与特定JSON API的同步.
I understand that you want to sync with a datasource, which doesn't have a CouchDB compatible API. Then you'll have to write code to perform the synchronization with your specific JSON API.
这篇关于将pouchDB与json数据同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!