T-Sql JSON_MODIFY 函数在附加新值对时存在一些问题,例如添加包装器
declare @jsonstring varchar(max) ='{"Width":"100%","Length":"45%"}'
select JSON_MODIFY(@jsonstring,'append $.Height ','50%' )
Run Code Online (Sandbox Code Playgroud)
-- 输出 {"Width":"100%","Length":"45%","Height":["50%"]}
-- 它添加的包装器我无法删除该包装器
-- 期待输出 { "宽度":"100%","长度":"45%","高度":"50%"}