Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tananaev/json-patch
A JSON patch (RFC 6902) library
https://github.com/tananaev/json-patch
java json-patch
Last synced: 1 day ago
JSON representation
A JSON patch (RFC 6902) library
- Host: GitHub
- URL: https://github.com/tananaev/json-patch
- Owner: tananaev
- License: apache-2.0
- Created: 2016-11-16T10:00:06.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-06-28T16:31:38.000Z (over 3 years ago)
- Last Synced: 2023-07-27T13:59:24.722Z (over 1 year ago)
- Topics: java, json-patch
- Language: Java
- Homepage:
- Size: 171 KB
- Stars: 14
- Watchers: 4
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JSON Patch Library - json-patch
## Overview
Java implementation of [RFC 6902 (JSON Patch)](http://tools.ietf.org/html/rfc6902) standard. This library is based on Google Gson JSON library.
This project is a fork of the [original library](https://github.com/riotopsys/json-patch) developed by C. A. Fitzgerald.
## Usage
Include dependency via Gradle:
```groovy
compile 'com.tananaev:json-patch:1.2'
```
or Maven:
```xmlcom.tananaev
json-patch
1.1```
### Patch creation
```
JsonPatchFactory jpf = new JsonPatchFactory();
JsonPatch patch = jpf.create(original, target);
```### Patch application
```
JsonElement target = patch.apply(original);
```## License
Apache License, Version 2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.