Loading [MathJax]/jax/output/HTML-CSS/jax.js
2 Star 0 Fork 0

mirrors_warpech/json-patch-php

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README

json-patch-php

Produce and apply json-patch objects.

Implements the IETF json-patch and json-pointer drafts:

http://tools.ietf.org/html/draft-ietf-appsawg-json-patch-02

http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-02

Entry points

  • get(doc,pointer) - get a value from a json document
  • diff(src,dst) - return patches to create dstfromsrc
  • patch(doc,patches) - apply patches to $doc and return result

Arguments are PHP arrays, i.e. the output of json_decode($json_string, 1)

All structures are implemented directly as PHP arrays. An array is considered to be 'associative' (e.g. like a JSON 'object') if it contains at least one non-numeric key.

Because of this, empty arrays ([]) and empty objects ({}) compare the same, and (for instance) an 'add' of a string key to an empty array will succeed in this implementation where it might fail in others.

Build Status

Empty file

About

Cancel

Releases

No release

Contributors

All

Language(Optional)

Activities

can not load any more
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_warpech/json-patch-php.git
git@gitee.com:mirrors_warpech/json-patch-php.git
mirrors_warpech
json-patch-php
json-patch-php
master

Search