Easier way to replace an array?
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 52/100
- Issue 类型
- 文档
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- powershell
调研方向
先查看链接 wiki 页面中的“Default Transformation”和“Replace Transformation”部分,然后根据 issue 中的两个 appsettings.json 示例验证文档所述的数组行为。如果存在更短的受支持语法,请将其记录下来;否则,请明确说明现有的 @jdt.replace 形式及其预期输出。
由索引模型根据 Issue 内容生成。
描述
Under the "Default Transformation" section there is an array listed as "SupportedVersions" that says the default transformation for arrays is append but when going to the "Replace" section, it does not show how to replace an array.
Let's assume I have 2 appsettings.json files that need merged so that the SupportedVersions array is replaced when listed under the Settings section.
First file
{
"Settings": {
"SupportedVersions" : [1, 2]
}
}
Second file
{
"Settings": {
"SupportedVersions" : [3, 4]
}
}
Expected output
{
"Settings": {
"SupportedVersions" : [3, 4]
}
}
I can get this to work by using the following but is there an easier way that I can't find in the documentation?
This works but is long
{
"Settings": {
"@jdt.replace" : {
"@jdt.path" : "$.SupportedVersions",
"@jdt.value" : [3, 4]
}
}
}
- 主要语言
- PowerShell
- 星标
- 117
- 派生
- 38
- 平均合并
- 5 天 52 分钟
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/json-document-transforms 的其他 Issue
-
难度 5/5 一周以上 新手友好度 15/100
-
难度 4/5 3-5 天 新手友好度 25/100
-
难度 3/5 1-2 天 新手友好度 38/100
-
难度 4/5 3-5 天 新手友好度 25/100
-
Release request未关闭
难度 3/5 1-2 天 新手友好度 25/100
microsoft/json-document-transforms#27 · 1 个 reaction ·
查看 microsoft/json-document-transforms 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 64/100
aws-samples/sample-per-model-bedrock#295 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 69/100
zephyrproject-rtos/reqmgmt#177 ·
-
documentation Size: XS
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
status:needs-triage
难度 1/5 1-3 小时 新手友好度 78/100
PX4/PX4-Autopilot#29292 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 83/100