json-patch Questions

3

Solved

I am trying to figure out the best way to patch a collection of objects. I am trying to change the sort order of a number of objects and was thinking jsonpatch may be the right approach. My Object ...
Handling asked 24/3, 2017 at 21:22

4

Solved

In my spring boot service, I'm using https://github.com/java-json-tools/json-patch for handling PATCH requests. Everything seems to be ok except a way to avoid modifying immutable fields like obje...

4

Solved

Has anyone found a good way to use data annotations to prevent specifc properties from being updated in a json patch doc. Model: public class Entity { [DoNotAllowPatchUpdate] public string I...
Complementary asked 27/4, 2018 at 15:9

2

Solved

I'm using a pretty vanilla spring-boot-starter-data-rest setup and enabled the PATCH method. All is working, but I have a security concern and wonder what's the recommended way of mitigating it. T...
Yovonnda asked 3/3, 2017 at 23:17

4

I see in the Microsoft docs and many examples where they call JsonPatchDocument.ApplyTo(patchObject, ModelState), but I can't seem to get it to build that way. I get a build error saying "Error CS1...
Extremist asked 13/9, 2019 at 20:19

4

Solved

I am trying to create an ASP.NET Core 3.1 application using Entity Framework Core and Hot Chocolate. The application needs to support creating, querying, updating and deleting objects through Graph...
Fetishist asked 6/4, 2020 at 16:51

2

Solved

I have a JSONB data stored in a column called data in table nftdata. Inside this JSON data (as shown below) there is a JSON array at result.data.items. This is an array of 2400 JSON objects but I h...
Odelle asked 9/8, 2022 at 16:20

4

I have WebAPI (.NET Core) and use FluentValidator to validate model, including updating. I use PATCH verb and have the following method: public IActionResult Update(int id, [FromBody] JsonPatchDoc...
Baronial asked 28/5, 2019 at 14:18

1

Solved

I want to support partial updates with JSON Merge Patch. The domain model is based on the always valid concept and has no public setters. Therefore I can't just apply the changes to the class types...
Shifrah asked 7/2, 2022 at 19:8

1

Solved

Is it possible to replace this --- apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: elastic-operator labels: argocd.application.type: "system" spec: ignoreDifference...
Boneblack asked 2/9, 2020 at 17:3

1

I have a json object like this: { "content" : [ { "id" : 54 "foo" : "bar" }, { "id" : 43 "foo" : "bar" }, { "id" : 76 "foo" : "bar" } ] } If I want to add multiple items to the co...
Barren asked 21/1, 2020 at 21:56

2

Solved

Overview I'm trying to write a web service using ASP.NET Core that allows clients to query and modify the state of a microcontroller. This microcontroller contains a number of systems that I model...
Janettjanetta asked 16/1, 2017 at 15:26

3

Solved

I'm getting a 'TypeError: Failed to fetch' error when trying to call my AspNetCore Restful API from Blazor Wasm. I can call it from Postman, and it works fine. My Environment: Microsoft Visual Stu...

1

Solved

JsonPatchDocument.Apply method works on an object graph, but instead I want to apply a json patch to plain json. For example, suppose I have this json: { "name": "JSON Patch", &...
Afroasian asked 14/9, 2020 at 18:9

1

Solved

Based on the docs that I've read, there are 3 methods of patching: patches patchesStrategicMerge patchesJson6902. The difference between patchesStrategicMerge and patchesJson6902 is obvious. patc...
Chilcote asked 26/8, 2020 at 19:33

2

I have the following JSON document, from which I want to remove the "roleId2" element from the "roles" field's array value: { "id" : 12345, "firstName": &q...
Eada asked 12/12, 2014 at 8:55

2

Solved

I'm trying to append an element to an array. But i cannot ensure that the array alread exists. So it should be created if not. This example works: Source json: { "data": [] } Patch doc: [{ ...
Disclamation asked 6/12, 2017 at 9:0

4

Solved

I'm working on asp.net core webAPi and EF core, and want to implement "update" operation (partially edit entity). I searched the correct way to deal with that, and saw that I should use j...
Frida asked 19/7, 2016 at 20:1

3

Solved

Referencing https://www.rfc-editor.org/rfc/rfc6902#appendix-A.14: A.14. ~ Escape Ordering An example target JSON document: { "/": 9, "~1": 10 } A JSON Patch document: ...
Annora asked 25/6, 2014 at 22:5

3

Solved

I have two JSON files: JSON 1 { "title": "This is a title", "person" : { "firstName" : "John", "lastName" : "Doe" }, "cities":[ "london", "paris" ] } JSON 2 { "title": "This is another ...
Spathose asked 2/11, 2017 at 8:40

3

Solved

Given I have two c# objects of the same type, I want to compare them to create a JsonPatchDocument. I have a StyleDetail class defined like this: public class StyleDetail { public string Id { ...
Yawmeter asked 29/4, 2017 at 5:17

1

Solved

I want to use the "fast-json-patch" library (https://github.com/Starcounter-Jack/JSON-Patch) in an Angular 2 application. I have tried adding: 'fast-json-patch': 'vendor/fast-json-patch/dist/json...
Heft asked 19/6, 2016 at 4:54

1

Solved

I am trying to programmatically add a parent-child relationship between two work items. I am using the Microsoft Team Foundation and Visual Studio Services libraries to export and import TFS 2015 a...
Haematocryal asked 9/1, 2018 at 19:36

1

Hi I am following this doc https://github.com/kubernetes/kubernetes/blob/master/docs/devel/api-conventions.md#strategic-merge-patch for strategic-merge-patch to partially update the JSON objects us...
Unusual asked 9/12, 2016 at 11:23

2

Solved

The short version is: How to patch the JSON object contained in a Postgres jsonb field using Spring Data Rest PATCH method? Here comes the long version, please consider the following entity: @Ent...
Hysteria asked 1/11, 2016 at 18:56

© 2022 - 2024 — McMap. All rights reserved.