powershell - Updating JObject (Newtonsoft.Json.Linq.JContainer) in PowerShell
问题描述
I am trying to update a JObject in PowerShell but running into some issues.
Currently I have:
PS> $jObject.GetType()
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True False JObject Newtonsoft.Json.Linq.JContainer
PS> $jObject
Type : Object
HasValues : True
First : {}
Last : {}
Count : 3
Parent : {"pollingIntervalInS": "3600" "observedCertificates": [
"<CertUri1>",
"<CertUri2>",
"<CertUri3>"
] "requireInitialSync": true}
Root : {secretsManagementSettings}
Next :
Previous :
Path : secretsManagementSettings
LineNumber : 0
LinePosition : 0
IsReadOnly : False
AllowNew : True
AllowEdit : True
AllowRemove : True
SupportsChangeNotification : True
SupportsSearching : False
SupportsSorting : False
IsSorted : False
SortProperty :
SortDirection : Ascending
IsFixedSize : False
SyncRoot : System.Object
IsSynchronized : False
Keys : {pollingIntervalInS, observedCertificates, requireInitialSync}
I am trying to updated the "observedCertificates" list with another entry. have tried converting to json, and also tried to work with the newtonsoft assembly to modify but without any results.
Any tips on how to proceed would be appreciated.
解决方案
推荐阅读
- c# - 从使用存储过程的 TableAdapter.Update() 方法返回值
- django - 在模板中访问内联表单集的父级?
- python - (Debian) Dragonboard 410c:Tensorflow 不是这个平台上支持的轮子
- typescript - VsCode 任务事件不会触发
- c# - 将目录移动到当前目录 C#
- wordpress - 我怎样才能创建一个像这样的简单测验?
- php - 从 mysql db 和 php 获取多级 json
- google-cloud-dataflow - Java OutOfMemoryError 使用 PubsubIO
- javascript - es6 更新现有父对象的子对象的方法
- c# - 在期望的类构造函数中动态插入枚举类型作为参数