SCIMReferenceCode icon indicating copy to clipboard operation
SCIMReferenceCode copied to clipboard

Question on 'value' in PatchOperation2Combined and the static Create() method vs assigning a value

Open mshiels opened this issue 1 year ago • 0 comments

Doing some tinkering with the SCIM reference sample and ran into a strange thing. Doing

var patch1 = PatchOperation2Combined.Create(OperationName.Replace, Path.Create(AttributeNames.Name + "." + AttributeNames.GivenName).ToString(),"new name");

ends up with the value being encoded into json as

{ "value": "new name" }

while doing

var patch1 = new PatchOperation2Combined(OperationName.Replace, Path.Create(AttributeNames.Name + "." + AttributeNames.GivenName).ToString()); patch.value = "new name";

just stores "new name".

Then when values are decoded inside patch they are deserialized as OperationValue[] then 'string', but wondering if it should also attempt a 'OperationValue' deserialize to stripg the "value": json wrapper it adds?

mshiels avatar Mar 21 '24 15:03 mshiels