The invention discloses a method and a device for
synchronizing json data into a
relational database. The method comprises the following steps that: a configuration file editing module obtains the synchronization requirements of synchronous data, and creates a configuration file; a configuration file analysis module reads the configuration file, analyzes and identifies the
json data source of eachpiece of synchronous data and a unique
target database, and establishes
database connection; a
json data reading module obtains the analyzed json
data source to read json data, and generates
mass synchronous
SQL (Structured
Query Language) statements according to a dat
field mapping relationship in the configuration; and a
relational database writing module writes the json data to a
target database on batch according to the
database connection. By use of the method, the configuration file can be flexibly and quickly edited and revised,
data synchronization is automatically carried out according to the configuration file, a synchronization process is controlled, a synchronization log is recorded, a synchronization progress is monitored, and a synchronization result is subjected to statistics. By use of the method, the json data is conveniently, flexibly, quickly and efficiently synchronized into the
relational database, and development efficiency is greatly improved.