Skip to content

TJMcCarthy95/JsonPatch

Repository files navigation

JsonPatch

JSONPatch Serialization .NET Example

Following repo contains an example of a JSON Patch implementation within .NET 7 using a JsonConverter to parse the Operation discriminator into the corresponding classes following the Domain Primitive principle.

Examples

Add Request

{
  "Data": [
    "string1",
    "string2"
  ],
  "Operation": "Add"
}

becomes

UpdateAddRequest {
  Data = System.Collections.Generic.List`1[System.String],
  Operation = Add
}

Empty Request

{
}

becomes

UpdateEmptyRequest {
  Operation = NotSpecified
}

About

JSONPatch Serialization .NET Example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages