You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from ._constantsimport (FeatureFlagConstants, KeyVaultConstants,
51
50
SearchFilterOptions, StatusCodes,
52
51
ImportExportProfiles, CompareFieldsMap,
53
-
JsonDiff, ImportMode)
52
+
JsonDiff, ImportMode,
53
+
AIConfigConstants, HttpHeaders)
54
54
from ._featuremodelsimportmap_keyvalue_to_featureflag
55
55
from ._jsonimportparse_json_with_comments
56
56
from ._modelsimport (convert_configurationsetting_to_keyvalue, convert_keyvalue_to_configurationsetting)
@@ -511,7 +511,7 @@ def set_key(cmd,
511
511
# Ensure that provided value is valid JSON and strip comments if needed.
512
512
value='null'ifvalueisNoneelsevalue
513
513
514
-
parse_json_with_comments(value)
514
+
__validate_json_value(value, content_type)
515
515
exceptValueError:
516
516
raiseCLIErrors.ValidationError('Value "{}" is not a valid JSON object, which conflicts with the content type "{}".'.format(value, content_type))
517
517
@@ -526,7 +526,7 @@ def set_key(cmd,
526
526
ifis_json_content_type(content_type):
527
527
try:
528
528
# Ensure that provided value is valid JSON and strip comments if needed.
529
-
parse_json_with_comments(value)
529
+
__validate_json_value(value, content_type)
530
530
except (TypeError, ValueError):
531
531
raiseCLIErrors.ValidationError('Value "{}" is not a valid JSON object, which conflicts with the content type "{}". Set the value again in valid JSON format.'.format(value, content_type))
0 commit comments