{"id":22173234,"url":"https://github.com/litejs/json-util","last_synced_at":"2025-03-24T17:45:25.948Z","repository":{"id":24217689,"uuid":"27609710","full_name":"litejs/json-util","owner":"litejs","description":"JSON Pointer [RFC 6901] and JSON Merge Patch [RFC 7396] implementation","archived":false,"fork":false,"pushed_at":"2017-04-27T06:06:17.000Z","size":37,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-19T22:13:33.504Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.litejs.com/json-util/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/litejs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-05T20:53:09.000Z","updated_at":"2022-01-08T19:52:05.000Z","dependencies_parsed_at":"2022-08-22T14:00:15.716Z","dependency_job_id":null,"html_url":"https://github.com/litejs/json-util","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litejs%2Fjson-util","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litejs%2Fjson-util/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litejs%2Fjson-util/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litejs%2Fjson-util/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/litejs","download_url":"https://codeload.github.com/litejs/json-util/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245320389,"owners_count":20596167,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-02T07:31:25.002Z","updated_at":"2025-03-24T17:45:25.929Z","avatar_url":"https://github.com/litejs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[1]: https://secure.travis-ci.org/litejs/json-util.png\n[2]: https://travis-ci.org/litejs/json-util\n[3]: https://coveralls.io/repos/litejs/json-util/badge.png\n[4]: https://coveralls.io/r/litejs/json-util\n[npm package]: https://npmjs.org/package/json-util\n[GitHub repo]: https://github.com/litejs/json-util\n[RFC 6901]: http://tools.ietf.org/html/rfc6901\n[RFC 7396]: http://tools.ietf.org/html/rfc7396\n\n\n    @version    2.3.0\n    @date       2017-04-27\n    @stability  3 - Stable\n\n\nJSON util \u0026ndash; [![Build][1]][2] [![Coverage][3]][4]\n=========\n\nJSON Pointer [RFC 6901][] and JSON Merge Patch [RFC 7396][] implementation.\nThe main goal is to have a small and reasonably fast code.\n\nWhen used directly with script tag,\nmethods are added to global JSON object.\n\nWhen used with `require`,\nmethods are exported as expected.\n\n\nExamples\n--------\n\n```javascript\nvar util = require(\"json-util\")\n, obj = {\"a\": {\"b\": 1}}\n\n// get a value\nvar b = util.pointer(obj, \"/a/b\")\n// b is 1\n\n// set a value\nvar oldValue = util.pointer(obj, \"/a/b\", 2) // sets value to 2\n// oldValue is 1\n\n// adding to a nonexistent target will create missing object literals\nutil.pointer(obj, \"/a/c/d/e\", \"3\")\n// obj is now {\"a\": {\"b\": 2, \"c\": {\"d\": {\"e\": \"3\"}}}}\n\n// apply a patch and collect JSON Pointers to array that were changed\nvar changed = []\nutil.mergePatch(obj, {\"a\": {\"c\": \"C\"}}, changed /* optional */)\n// obj is now {\"a\": {\"b\": 2, \"c\": \"C\"}}\n// changed = [\"/a\", \"/a/c\"]\n\n// test is it a object literal\njson.isObject(obj)\n// true\n```\n\n\nCoding Style Guidelines\n-----------------------\n\n-   Use tabs for indentation, align with spaces\n-   Use lowerCamelCase for method and variable names\n-   Use UpperCamelCase for constructor names\n-   Commit files with Unix-style line endings\n-   Do not use spaces in file and directory names\n    Consider substituting a dash (-) where you would normally use spaces.\n-   Rebase before pushing\n-   Fix tests before push or pull request\n\n\nExternal links\n--------------\n\n-   [GitHub repo][]\n-   [npm package][]\n-   JSON Pointer [RFC 6901][]\n-   JSON Merge Patch [RFC 7396][]\n\n\n### Licence\n\nCopyright (c) 2014-2016 Lauri Rooden \u0026lt;lauri@rooden.ee\u0026gt;  \n[The MIT License](http://lauri.rooden.ee/mit-license.txt)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitejs%2Fjson-util","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flitejs%2Fjson-util","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitejs%2Fjson-util/lists"}