Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
71 views

I am implementing a PATCH endpoint in Spring Boot using JSON Patch (com.github.fge:json-patch). The patch is applied successfully, but Bean Validation annotations on my entity (such as @NotBlank, @...
Mayank Grover's user avatar
0 votes
1 answer
81 views

I have the following script called Minimal.ps1: Add-Type -LiteralPath "$PSScriptRoot/lib/JsonPatch.Net.dll" $ErrorActionPreference = "Stop" [System.Text.Json.JsonSerializer]::...
Araxor's user avatar
  • 9
2 votes
0 answers
85 views

We are implementing patch in .net 7, using JsonPatchDocument and want to add a product to a task. Problem is we are not using database id's in the frontend, but identifiers. Without identifiers, we ...
Michael Winther's user avatar
0 votes
1 answer
401 views

I'm having trouble creating a new work item in Azure DevOps using the REST API. Specifically, I want to include the Microsoft.VSTS.Common.Priority and Microsoft.VSTS.Common.StackRank fields, but my ...
Neima Mohamed Abdoulkader's user avatar
0 votes
1 answer
67 views

I am working on an ASP.NET Core Web API where I need to apply JSON Patch operations to update entities. The problem I'm encountering is that after applying the JSON Patch, the laboId and analyseId ...
Nadia akrach's user avatar
0 votes
1 answer
1k views

I am trying to do a kustomize patch to an existing Helm deployment via a CI/CD pipeline. The CI pipeline is failing kustomize checks with error: error: accumulating components: accumulateDirectory: &...
Golide's user avatar
  • 1,031
0 votes
2 answers
319 views

I'm working with a small application just to study .NET Core and C#. I have a model called Movie and one of its fields is a byte array to store an image. I want to know how is it possible to use ...
Daniel's user avatar
  • 321
0 votes
1 answer
421 views

I have the following method in my ASP.NET Core Web API. It's using Microsoft.AspNetCore.JsonPatch for patching: [HttpPatch] public IActionResult PatchCustomer([FromBody] JsonPatchDocument<...
LP13's user avatar
  • 34.8k
0 votes
0 answers
167 views

Looks like, JsonPatchDocument's ApplyTo takes the serialization settings from JsonConvert.DefaultSettings. There should be a way to pass custome JsonSerializerSettings to th library so ApplyTo can ...
HoBa's user avatar
  • 3,634
0 votes
0 answers
305 views

I have a usecase where I want to figure out how a json was modified. I have to compare 2 json objects, one before it was modifed and one object representing the state after modfication. The json have ...
Subhomoy Sikdar's user avatar
0 votes
1 answer
361 views

I get a complex json every few hours. Part of it is a Game object with a list of Player objects that each Player has a list of Training object (each object has also other fields - ints, strings, list ...
Rony Tesler's user avatar
  • 1,406
-2 votes
2 answers
213 views

I have a model with a List<string>. I am writing an API endpoint which accepts a JsonPatchDocument and uses that to update the List. The endpoint then saves the changes to the database. Logging ...
Zvi's user avatar
  • 107
0 votes
1 answer
165 views

What type of data structure can help compress JSON patches? We can compress JSON patches by removing redundant patches. Redundant patches are patches which are fully replaced later, either by a patch ...
Sentient's user avatar
  • 871
2 votes
0 answers
125 views

I have developed a restapi using SpringBoot. I would now like implements object manipulation by jsonpatch. In general, I would like the restrict the patch to certain properties. For example, in ...
Helotrix's user avatar
  • 231
1 vote
0 answers
353 views

I am using json patch 1.13 version to apply patch on my json payload . This is the POM Entry using for json patch <dependency> <groupId>com.github.java-json-tools</groupId> <...
VKP's user avatar
  • 668
2 votes
1 answer
1k views

Say I have an entity that looks like this: { "list": ["foo", "qux", "bar"] } If I want to remove "foo" and "bar" using one JSON patch ...
gislikonrad's user avatar
  • 3,591
1 vote
1 answer
1k views

I need to validate the JsonPatchDocument which is coming in the request before applying it to my object. public async Task<IActionResult> UpdateUserByIdAsync([Required][StringLength(40)] string ...
Amir Suhel's user avatar
1 vote
0 answers
231 views

Is there a way to restrict (or only allow) certain fields from being altered by a json-patch method? Is this even a desired feature of HTTP PATCH? I could not find anything (neither positive nor ...
ch1ll's user avatar
  • 533
-1 votes
1 answer
1k views

In my React application, I'm using useForm to sending my forms. When I'm using the PATCH method and sending to API a value (array): participants.push({ participant_id: person, place_id: place }); ...
Jakub Skorus's user avatar
0 votes
0 answers
254 views

I have a requirement where an event will emit a JSON following a defined schema = JSON-EventA schema. I have a config(config.json) that follows another JSON-EventB schema. Using data from JSON-EventA ...
RKS's user avatar
  • 140
0 votes
1 answer
990 views

I have a web API, where I'm trying to support a PATCH request with a JSON Patch body to make changes to an object on the server. I am using ASP Core with .Net 6, hosting using IIS on my web host. This ...
Tony's user avatar
  • 499
1 vote
1 answer
347 views

Entity Framework >= 7.0 provides HashSet<T> as implementation to 1-n and m-n associations (i.e. collections). In my case, these associations are typed as ICollection<T>, and HashSet<...
Matías Fidemraizer's user avatar
0 votes
1 answer
129 views

Newer MySQL versions (as well as SQLite and other databases supported by Knex.js) offer a great way to partially update JSON columns: JSON_MERGE_PATCH (aka JSON_PATCH in SQLite). As far as I can tell, ...
kgaspard's user avatar
  • 372
1 vote
0 answers
800 views

Library used: com.github.fge.jsonpatch And I have one PATCH endpoint which accepts the String of json-patch operations. public Employee patchEmployee(String patchOperations, String empId); This method ...
Arthur's user avatar
  • 127
0 votes
1 answer
949 views

The API to be invoked uses JsonPatch. The following is a sample JSON. { "hello": false , "array1": [ { "subarray": [ "k2", "k1"] } , { &...
Khanna111's user avatar
  • 3,961
2 votes
2 answers
1k views

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 have ...
Laniakea's user avatar
0 votes
0 answers
263 views

I am trying to use JSON patch in my .net core project to update data. I am using Table-per-type in my architecture for this particular feature. So my models are like this. I have a form model public ...
mohsinali1317's user avatar
2 votes
1 answer
2k views

I want to be able to patch an item that consist of multiple properties, some of them are collections of classes. For now, I do not have any collection in the child classes, but potentially they can be ...
Mykola's user avatar
  • 236
2 votes
2 answers
7k views

I have an application with different versions. The base resource file for each version is slightly different. But the patch which needs to be applied to the base file is same. What should be the best ...
JoyceLee's user avatar
  • 109
2 votes
1 answer
670 views

When for example an invalid date has been entered the response message will be the following. { "errors": { "AccountDto": [ "The value '77-77-7777' ...
user3261212's user avatar
-1 votes
1 answer
883 views

I am trying to add an element to a JSON array using Microsoft's JsonPatch implementation in .NET 6: JSON input: { "foo": [ 1 ] } Expected JSON output: { "foo": [ 1, 2 ] } ...
Maxime Rossini's user avatar
1 vote
0 answers
350 views

In java, is it possible to configure the Json patch to perform operation on collections using id object instead of position? for example: { "op": "replace", "path": ...
Michael Cauduro's user avatar
3 votes
0 answers
901 views

I am trying to implement JsonPatchDocument in .NET Framework 4.8, and the nuget package has installed successfully, and the code builds. But when I try to call an endpoint that accepts HTTP Patch, the ...
NollerNiller's user avatar
0 votes
2 answers
2k views

I have one payload like below to update via patch call in webAPI. [ { "value": [ { "Id": "12", "name": "ABC" }, ...
Abhishek's user avatar
  • 125
0 votes
1 answer
483 views

Currently have an asp.net web api and implementing JSON Patch using AspNetCore.JsonPatch and want to perform a side effect if a certain action is done via Json patch? E.g. patch request to update an ...
jjnrmason's user avatar
  • 311
2 votes
2 answers
1k views

I have 2 objects that I'm trying to diff. For this purpose I use Jackson ObjectMapper in spring-boot version 2.1.3 to de-serialize them to a String, read them as a tree (convert to JsonNode) and then ...
linuxNoob's user avatar
  • 730
0 votes
1 answer
978 views

I'm working on a test suite for some Java code that uses jsonpatch to modify db entries. What I am trying to do is have a template jsonpatch request saved down as a file that individual unit tests ...
5E4ME's user avatar
  • 273
1 vote
0 answers
334 views

I've developed a tool which creates JSON patch results in a .csv file specifying differences between two sets of JSON files. I want the business side of my organisation to be able to easily interpret ...
gsdev's user avatar
  • 259
0 votes
2 answers
2k views

To create a workitem I need to specify its fields but where exactly can I see all the possible "field paths" on my AzureDevOps site? I've edited an existing workitem and added some more ...
HereToLearn's user avatar
1 vote
1 answer
1k views

I'm trying out JsonPatch but ran into an issue when I try to test it. My REST controller looks like this: @RestController @RequestMapping("/v1/arbetsorder") class ArbetsorderController { @...
Richard Silvertass's user avatar
1 vote
1 answer
2k views

Are there any recommendations for cases where you need some members to be immutable/read-only as far as patch operations are concerned? Normally we would pass a context entity to the JsonPatchDocument,...
Rinus van Heerden's user avatar
1 vote
1 answer
1k views

I have a Spring Boot application in which I want to enable the JSON Patching of multiple resources at the same time, as described in this question. My endpoint accepts a javax.json.JsonPatch as ...
Daniel Pop's user avatar
4 votes
1 answer
3k views

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. I ...
M. Koch's user avatar
  • 842
0 votes
1 answer
2k views

Given the JSON object { "property": "value" } If you perform a JSON patch on this object like the following [{ "op": "add", "path": "/...
gislikonrad's user avatar
  • 3,591
3 votes
1 answer
3k views

I am using Newtonsoft.Json.JsonConvert.SerializeObject to convert a JsonPatchDocument<T> to string but it's value property (which is in JObject format) doesn't seem to be converted to string. ...
Serhat's user avatar
  • 724
1 vote
1 answer
856 views

I am trying to write a test for patch end point using rest assured mock mvc. But i am not able to create an object of jsonmerge patch to place in the body of the mock.below is the end point for which ...
Apurv Adarsh's user avatar
0 votes
1 answer
868 views

I'm attempting to create a revisable document, with the edits stored as fast-json-patched objects. The rough outline is : const jsonpatch = require('fast-json-patch'); /** * Generate a doc, with all ...
Dycey's user avatar
  • 4,775
0 votes
1 answer
379 views

Does Json Patch violate REST rules? My API won't be RESTful if I use it? Or, maybe not? { "op": "replace", "path": "/biscuits/0/name", "value": "...
Andrea Bocieli's user avatar
2 votes
1 answer
1k views

I have a data model like this: Student { public string Name {get; set;} public Address address {get; set;} } Address { public string City {get; set;} public int Postcode {get; ...
Manh Quang's user avatar
2 votes
1 answer
3k views

Java String which I retrieved from the database: [ { "op": "replace", "path": "/baz", "value": "boo" }, { "op": "add"...
Ayush's user avatar
  • 284