Map data from from one JSON schema to another as they share common data in php

1k Views Asked by At

I have product data from our internal system that has a particular JSON schema. I have to transform/map it into another json schema format so that this new data can be pushed to another system. I am aware of manually going through each data and creating new data. Is there any library that takes data that belongs to one JSON schema and based on mapping/rule supplied to it converts into another format?

1

There are 1 best solutions below

0
On

This library could help: https://github.com/ScriptFUSION/Mapper

Mapper transforms arrays from one format to another using an object composition DSL. An application often receives data from a foreign source structured differently than it wants. We can use Mapper to transform foreign data into a more suitable format for our application using a Mapping as shown in the following example.