The most widespread format and which offers the best compatibility is CSV (comma-separated values), it has been used since before the advent of personal computers, the format was already supported in 1972 in IBM Fortran. Its close connection with SQL makes it the easiest format to use. However, it has several limitations that have led today to use for data interchange: XML, JSON and YAML. It is also possible to import from Microsoft Excel format, this format is more practical for inexperienced users who use Windows and MS Office, but it should be noted that in order to transfer the XLSX file must contain only and only text and numbers, no formula , image. If we want to work with CSV files, I recommend installing LibreOffice on your PC to edit files easily.
In summary, therefore, the data exchange format to choose is among the following:
- CSV (comma-separated values) for its greater diffusion and compatibility, with this format you must be very careful that in the fields there is no character used as text separator and column delimiter; A peculiarity of the CSV is also the ease with which it can be divided into several parts ( see here ), which is very convenient to avoid timeout (error 502) by the server, if we use the native import of PrestaShop or a module that performs the 'import without AJAX,
- XML (eXtensible Markup Languag) is much more robust, widespread and allows the management of any type of information. It is no coincidence that XML was chosen for electronic invoices. It is important for HTML and text fields to use the CDATA system.
The JSON format (Javascript Object Notation), can be used to import data, where the simplicity of representation, in the serialization and transmission gives the format a better agility in certain contexts. While it is excellent combined with technologies such as Ajax and Javascript, very useful for structured data and rich snippets for which JSON-LD is used today, I do not consider it valid for importing product catalogs, customers and data into management systems and PrestaShop, as it is scarcely widespread for this activity.
Unfortunately, it may happen that some melter will give you access to APIs that provide you with data in this format. Even the PrestaShop APIs allow you to provide data in JSON, the reason is simple it is natively supported by many languages and requires less work than XML in generation.
The YAML format is not very widespread, it is easier for humans to read and extends the JSON format, you will hardly find yourself importing data from this format into PrestaShop.