【发布时间】:2018-09-15 11:24:06
【问题描述】:
我有一个 JSON 文件:
{
"header": {
"uuid": "c578592a-a751-4993-9060-53f488597e59",
"timestamp": 1522938800,
"productionDateTime": "2018-04-05T14:33:20.000+00:00",
"producers": {
"operator": null,
"application": {
"com.example": {
"id": {
"string": "1"
},
"name": {
"string": "Test"
}
}
},
"station": null,
"equipment": null,
"partner": null,
"flow": null
},
"correlationContext": {
"array": [{
"correlationId": "98440498-3104-479e-9c99-f4449ba8f4b6",
"correlationDateTime": {
"string": "2018-04-05T14:30:39.000+00:00"
}
}]
}
},
}
我想创建 n 个复制 JSON 文件但具有随机相关 ID 和相关日期时间的文件。
您有什么建议或建议吗?非常感谢!
【问题讨论】:
-
你的系统里有python吗?
-
是的,你能告诉我更多细节吗?
-
@Itqbx,我提供了一个解决方案。试试看。它对我有用。
-
随机“correlationDateTime”是什么意思?从现在到宇宙大爆炸?现在和 Unix 时代的开始?
标签: json bash sed jq auto-generate