{"id":18498186,"url":"https://github.com/dedidata/services-json","last_synced_at":"2025-04-09T00:31:01.606Z","repository":{"id":143537353,"uuid":"102473391","full_name":"DediData/services-json","owner":"DediData","description":"Better convert to and from JSON format in PHP (json encode , json decode)","archived":false,"fork":false,"pushed_at":"2017-09-05T11:57:40.000Z","size":15,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-23T19:44:46.929Z","etag":null,"topics":["json","json-api","json-api-serializer","json-parser","json-serialization","php","php-serializable"],"latest_commit_sha":null,"homepage":"https://dedidata.com","language":"PHP","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/DediData.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-05T11:33:35.000Z","updated_at":"2019-11-11T04:31:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"43babd84-5fd4-4d1b-a603-e170b4f0c957","html_url":"https://github.com/DediData/services-json","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DediData%2Fservices-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DediData%2Fservices-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DediData%2Fservices-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DediData%2Fservices-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DediData","download_url":"https://codeload.github.com/DediData/services-json/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247949778,"owners_count":21023387,"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":["json","json-api","json-api-serializer","json-parser","json-serialization","php","php-serializable"],"created_at":"2024-11-06T13:38:01.552Z","updated_at":"2025-04-09T00:31:01.597Z","avatar_url":"https://github.com/DediData.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Services-Json\n======\n\n## Better Convert to and from JSON format in PHP (json encode, json decode)\n\nJSON (JavaScript Object Notation) is a lightweight data-interchange\nformat. It is easy for humans to read and write. It is easy for machines\nto parse and generate. It is based on a subset of the JavaScript\nProgramming Language, Standard ECMA-262 3rd Edition - December 1999.\nThis feature can also be found in  Python. JSON is a text format that is\ncompletely language independent but uses conventions that are familiar\nto programmers of the C-family of languages, including C, C++, C#, Java,\nJavaScript, Perl, TCL, and many others. These properties make JSON an\nideal data-interchange language.\n\nThis package provides a simple encoder and decoder for JSON notation. It\nis intended for use with client-side Javascript applications that make\nuse of HTTPRequest to perform server communication functions - data can\nbe encoded into JSON notation for use in a client-side javascript, or\ndecoded from incoming Javascript requests. JSON format is native to\nJavascript, and can be directly eval()'ed with no further parsing\noverhead\n \n#### All strings should be in ASCII or UTF-8 format!\n\n### Brief example of use:\n\n```php\n// create a new instance of Services_JSON\n$json = new Services_JSON();\n\n// convert a complexe value to JSON notation, and send it to the browser\n$value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4)));\n$output = $json-\u003eencode($value);\n\nprint($output);\n// prints: [\"foo\",\"bar\",[1,2,\"baz\"],[3,[4]]]\n\n// accept incoming POST data, assumed to be in JSON notation\n$input = file_get_contents('php://input', 1000000);\n$value = $json-\u003edecode($input);\n\n// if you want to convert json to php arrays:\n$json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdedidata%2Fservices-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdedidata%2Fservices-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdedidata%2Fservices-json/lists"}