如何使用Jolt转换为从json到json的转换创建Jolt规范?

如何使用Jolt转换创建从json到json转换的jolt规范?我正在使用Jolt工具测试json规范:http://jolt-demo.appspot.com/#inception

这是我的输入json:

  "nameLong": [
    {
      "source": "trdse","value": "PDL Community Bancorp Ord Shs"
    }
  ],"instrumentRelations": [
    {
      "relationType": "Underlying","refData": {
        "securities": [
          {
            "ric": [
              {
                "source": "trdse","errorCode": 103
              }
            ],"trQuoteId": [
              {
                "source": "trdse","errorCode": 103
              }
            ]
          }
        ]
      }
    }
  ],"instrumentLegalEntityRelations": [
    {
      "relationType": "Issuer","refData": {
        "legalEntityName": [
          {
            "source": "trdse","value": "Qatar Cinema and Film Distribution Co QSC"
          }
        ],"lei": [
          {
            "source": "trdse","errorCode": 103
          }
        ],"trIssuerOrgId": [
          {
            "source": "trdse","value": "139102"
          }
        ]
      }
    },{
      "relationType": "garantor","refData": {
        "legalEntityName": [
          {
            "source": "figi2","value": "qatar 2 "
          }
        ],"lei": [
          {
            "source": "figi2","trIssuerOrgId": [
          {
            "source": "figi2","value": "139102"
          }
        ]
      }
    }
  ]
}

预期输出::

  "instrument" : {
    "nameLong" : [ {
      "source" : "trdse","value" : "PDL Community Bancorp Ord Shs"
    } ],"Underlyings" : [ {
      "instruments" : {
        "securities" : [ {
          "ric" : [ {
            "source" : "trdse","errorCode" : 103
          } ],"trQuoteId" : [ {
            "source" : "trdse","errorCode" : 103
          } ]
        } ]
      }
    } ],"Issuer" : {
        "legalEntityName": [
          {
            "source": "trdse","value": "139102"
          }
        ]
      },"garantor" : {
        "legalEntityName": [
          {
            "source": "figi2","value": "139102"
          }
        ]
      }
  }
}

我需要创建一个json规范,到目前为止,我已经创建了一个json规范,但是我无法取得进展并到达最终输出:

    "operation": "shift","spec": {
      "instrumentRelations": {
        "*": {
          "refData": "instrument.Underlyings[].instruments"
        }
      },"*": "instrument.&"
    }
  }
 ]
skymanf 回答:如何使用Jolt转换为从json到json的转换创建Jolt规范?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2791252.html

大家都在问