#22531 closed enhancement (wontfix)
integrate fetch_json($url)
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | |
| Severity: | normal | Keywords: | |
| Cc: |
Description
as we have fetch_feed() function, it will be great to have fetch_json() function too, to download a json file and decode into an array.
Change History (4)
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
- Type changed from defect (bug) to enhancement
There is no need of it.
Replying to nacin:
Feeds need to be parsed. JSON doesn't. Here's your function: json_decode( file_get_contents( $url ) );
It is not nice to have file_get_contents function in a theme
Note: See
TracTickets for help on using
tickets.

Feeds need to be parsed. JSON doesn't. Here's your function: json_decode( file_get_contents( $url ) );