Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mshiels opened this issue Mar 21, 2024 · 0 comments

Comments

@mshiels
Copy link

mshiels commented Mar 21, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant