{"id":26715080,"url":"https://github.com/tarlepp/badr-ferrassi","last_synced_at":"2026-04-29T08:01:32.167Z","repository":{"id":46154413,"uuid":"304877227","full_name":"tarlepp/badr-ferrassi","owner":"tarlepp","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-06T18:26:15.000Z","size":37,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T13:51:52.613Z","etag":null,"topics":["community-help","example","serializer","symfony"],"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/tarlepp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-17T12:52:36.000Z","updated_at":"2020-11-07T12:13:51.000Z","dependencies_parsed_at":"2022-08-26T16:02:02.620Z","dependency_job_id":null,"html_url":"https://github.com/tarlepp/badr-ferrassi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tarlepp/badr-ferrassi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarlepp%2Fbadr-ferrassi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarlepp%2Fbadr-ferrassi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarlepp%2Fbadr-ferrassi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarlepp%2Fbadr-ferrassi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tarlepp","download_url":"https://codeload.github.com/tarlepp/badr-ferrassi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarlepp%2Fbadr-ferrassi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32416146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["community-help","example","serializer","symfony"],"created_at":"2025-03-27T13:51:55.321Z","updated_at":"2026-04-29T08:01:32.128Z","avatar_url":"https://github.com/tarlepp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What is this?\n\nJust a quick demo how to use Symfony `Serializer` component.\n\n## Question\n\nSomeone asked following on Symfony Slack workspace;\n\n```\nHello,\ni follow the Serializer component documentation, to turn specific json into object\nhttps://symfony.com/doc/current/components/serializer.html#deserializing-an-object\nI make this call to receive a list of objects.\n$response = $httpClient-\u003erequest('GET', 'https://www.example.com/web/app.php/api/articles?next=1\u0026Type=ep');\ndump($response-\u003egetContent());\nSo I have an list of Article Objects.\n\n{\n    \"header\": {\n        \"error\": 0,\n        \"message\": \"ok\",\n        \"next\": 2\n    },\n    \"results\": [\n        {\n            \"id\": 17007,\n            \"title\": \"test article title 1\"\n        },\n        {\n            \"id\": 17008,\n            \"title\": \"sample article 2\"\n        }\n    ]\n}\n\nI would like to deserialize the results part... The problem is that the Symfony Serializer gives me one null object\n\n$encoders = [new XmlEncoder(), new JsonEncoder()];\n$normalizers = [new ObjectNormalizer()];\n$serializer = new Serializer($normalizers, $encoders);\n$articles = $serializer-\u003edeserialize($response, Articles::class, 'json');\ndump($articles);\n\nwhat is the probleme please ?\n```\n\nSo this repository contains simple example how to make that happen\n\n## Authors\n\n* [Tarmo Leppänen](https://github.com/tarlepp)\n\n## License\n\n[The MIT License (MIT)](LICENSE)\n\nCopyright © 2020 Tarmo Leppänen\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarlepp%2Fbadr-ferrassi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftarlepp%2Fbadr-ferrassi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarlepp%2Fbadr-ferrassi/lists"}