tranquangkhuong/data-transformer

A package to transform data between applications based on JSON configuration.

v1.0.5 2024-12-13 03:03 UTC

This package is auto-updated.

Last update: 2025-01-13 03:24:03 UTC


README

  • PHP ext: mbstring

Configuration key/value list


__[children] contains multi config


Example

[
  {
    "app1": {
      "key": "username",
      "type": "string",
      "case": "send"
    },
    "app2": {
      "key": "user_name",
      "type": "string",
      "case": [
        "send",
        "result"
      ]
    }
  },
  {
    "app1": {
      "key": "user_gender",
      "type": "string",
      "case": "send"
    },
    "app2": {
      "key": "user.gender",
      "type": "string",
      "case": [
        "send",
        "result"
      ]
    }
  },
  {
    "app1": {
      "key": "info",
      "type": "list",
      "case": "send"
    },
    "app2": {
      "key": "infomation",
      "type": "list",
      "case": [
        "send",
        "result"
      ]
    },
    "__[children]": [
      {
        "app1": {
          "key": "name",
          "type": "string",
          "case": "send"
        },
        "motcua": {
          "key": "fullname",
          "type": "string",
          "case": "send"
        }
      }
    ]
  }
]