{"id":30146585,"url":"https://github.com/apioo/psx-json","last_synced_at":"2025-08-11T09:39:42.538Z","repository":{"id":57045578,"uuid":"55150493","full_name":"apioo/psx-json","owner":"apioo","description":"Read and transform JSON documents through JSON-Patch/Pointer","archived":false,"fork":false,"pushed_at":"2025-02-02T10:57:41.000Z","size":123,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-09T13:35:37.127Z","etag":null,"topics":["json","json-patch","json-pointer","json-rpc"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apioo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"chriskapp","patreon":"fusio","custom":"https://www.paypal.me/fusioapi"}},"created_at":"2016-03-31T12:55:14.000Z","updated_at":"2025-02-02T10:57:45.000Z","dependencies_parsed_at":"2024-06-19T01:55:19.947Z","dependency_job_id":"ffe87df8-766f-4749-bc8d-b8c5d6e4e559","html_url":"https://github.com/apioo/psx-json","commit_stats":{"total_commits":57,"total_committers":2,"mean_commits":28.5,"dds":"0.26315789473684215","last_synced_commit":"0e85bef8d9f88fd87b1943b989ab4f5c9848d6fa"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/apioo/psx-json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apioo%2Fpsx-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apioo%2Fpsx-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apioo%2Fpsx-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apioo%2Fpsx-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apioo","download_url":"https://codeload.github.com/apioo/psx-json/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apioo%2Fpsx-json/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269864160,"owners_count":24487576,"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","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["json","json-patch","json-pointer","json-rpc"],"created_at":"2025-08-11T09:39:28.803Z","updated_at":"2025-08-11T09:39:42.528Z","avatar_url":"https://github.com/apioo.png","language":"PHP","funding_links":["https://github.com/sponsors/chriskapp","https://patreon.com/fusio","https://www.paypal.me/fusioapi"],"categories":[],"sub_categories":[],"readme":"\n# Json\n\n## About\n\nLibrary which contains classes to handle JSON data. It implements the JSON patch\nand pointer specification and provides a simple JSON RPC server.\n\n## Usage\n\n### Patch/Pointer\n\n```php\n\u003c?php\n\n$document = Document::from(\\json_decode(\\file_get_contents('/test.json')));\n// or\n$document = Document::from(\\json_decode('{\"author\": {\"name\": \"foo\"}}'));\n\n// get a value through a json pointer\n$name = $document-\u003epointer('/author/name');\n\n// compare whether this document is equal to another document\n$document-\u003eequals(['foo' =\u003e 'bar']);\n\n// apply patch operations on the document\n$document-\u003epatch([\n    (object) ['op' =\u003e 'add', 'path' =\u003e '/author/uri', 'value' =\u003e 'http://google.com'],\n]);\n\n// convert the document back to a json string\necho $document-\u003etoString();\n```\n\n### RPC Server\n\nThe following example shows a super simple JSON RPC server using plain PHP.\nIt is also easy possible to integrate the server into any existing framework.\n\n```php\n\u003c?php\n\nuse PSX\\Json\\RPC\\Server;\nuse PSX\\Json\\RPC\\Exception\\MethodNotFoundException;\n\n$server = new Server(function($method, $arguments){\n    if ($method === 'sum') {\n        return array_sum($arguments);\n    } else {\n        throw new MethodNotFoundException('Method not found');\n    }\n});\n\n$return = $server-\u003einvoke(\\json_decode(file_get_contents('php://input')));\n\nheader('Content-Type: application/json');\necho \\json_encode($return, JSON_PRETTY_PRINT);\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapioo%2Fpsx-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapioo%2Fpsx-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapioo%2Fpsx-json/lists"}