paquettg / leaguewrap

League of Legend API wrapper
MIT License
67 stars 28 forks source link

Object to JSON or Array #47

Closed ctsstc closed 10 years ago

ctsstc commented 10 years ago

Is there any easy way that everything could have a function call like: to_json or to_array or maybe access to the raw data that gets returned?

paquettg commented 10 years ago

You can call the raw() method on any DTO

https://github.com/paquettg/leaguewrap/blob/master/src/LeagueWrap/Dto/AbstractDto.php#L96

I could always implement an option to return a json string instead of an array for the raw output but that is another topic :)