{"id":20048594,"url":"https://github.com/sbwerewolf/json-serialize-trait","last_synced_at":"2026-01-20T07:01:30.342Z","repository":{"id":65448975,"uuid":"592551735","full_name":"SbWereWolf/json-serialize-trait","owner":"SbWereWolf","description":"PHP library with trait of ability to output all properties of class-exemplar at call json_encode()","archived":false,"fork":false,"pushed_at":"2024-06-15T10:05:56.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-24T01:31:03.424Z","etag":null,"topics":["json-serialization","json-serializer","php-library","php-object-to-json","to-json"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SbWereWolf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2023-01-24T00:56:00.000Z","updated_at":"2024-06-15T10:05:59.000Z","dependencies_parsed_at":"2023-02-13T07:31:10.386Z","dependency_job_id":null,"html_url":"https://github.com/SbWereWolf/json-serialize-trait","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/SbWereWolf/json-serialize-trait","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SbWereWolf%2Fjson-serialize-trait","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SbWereWolf%2Fjson-serialize-trait/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SbWereWolf%2Fjson-serialize-trait/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SbWereWolf%2Fjson-serialize-trait/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SbWereWolf","download_url":"https://codeload.github.com/SbWereWolf/json-serialize-trait/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SbWereWolf%2Fjson-serialize-trait/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28597985,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-serialization","json-serializer","php-library","php-object-to-json","to-json"],"created_at":"2024-11-13T11:44:46.094Z","updated_at":"2026-01-20T07:01:30.325Z","avatar_url":"https://github.com/SbWereWolf.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JsonSerialize\n\nLibrary with trait of ability to output all properties\nof class-exemplar at call json_encode()\n\n## How to install\n`composer require sbwerewolf/json-serialize-trait`\n\n## How to use\n\nTo use JsonSerialize you should declare use statement into class\n\n```php\nuse \\SbWereWolf\\JsonSerializable\\JsonSerializeTrait;\n```\n\nExample\n\n```php\nclass TraitTest implements JsonSerializable\n{\n/* Declaration of trait use */\n    use \\SbWereWolf\\JsonSerializable\\JsonSerializeTrait;\n/* Declaration of class properties */\n    private $privateProp = 'privateProp';\n    protected $protectedProp = 'protected property value';\n    public $publicProp = 'public class member';\n}\n/* Convert class-exemplar to JSON */\necho json_encode(new TraitTest(),JSON_PRETTY_PRINT);\n/*\n{\n    \"privateProp\": \"privateProp\",\n    \"protectedProp\": \"protected property value\",\n    \"publicProp\": \"public class member\"\n}\n*/\n```\n\n## Contacts\n\n```\nVolkhin Nikolay\ne-mail ulfnew@gmail.com\nphone +7-902-272-65-35\nTelegram @sbwerewolf\n```\n\nChat with me via messenger\n\n- [Telegram chat with me](https://t.me/SbWereWolf)\n- [WhatsApp chat with me](https://wa.me/79022726535) ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbwerewolf%2Fjson-serialize-trait","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsbwerewolf%2Fjson-serialize-trait","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbwerewolf%2Fjson-serialize-trait/lists"}