csplrj Posted April 9, 2011 Share Posted April 9, 2011 json_decode returns a stdClass Object. Is there any way where I can get instance of my class instead of the same? I mean If I json_decode the below string then it will provide me instance of stdClass and not instance of Person class {"name":"a"} How to achieve the same? Thanks in advance CSJakharia Quote Link to comment https://forums.phpfreaks.com/topic/233216-json_decode-return-instance-of-person-class/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.