unl/UNL_UCBCN_Frontend — pull request #82 by mfairchild365 (2014-07-22 15:53:01+00:00)
Title: Fix JSON output

closes #76

Remove dependency on the xml2json library

Instead add a function to convert an eventInstance into a PHP array, which can then be exported with json_encode.

The resulting json for an event instance will be slightly different, mostly in the way it represents items in list.
For example:

This XML structure used to translate into a Webpages.Webpage.URL (not an array).
```

```

The issue was that if the list contained multiple `Webpage`s, it the resulting JSON would become an array. This was not apparent to clients that consumed the JSON response and could easily result in errors. For example: logic like this was required: https://github.com/unl/wdntemplates/blob/ef0dede2fe548454a3171f448799c91cfe2231ef/wdn/templates_4.0/scripts/events-band.js#L28

To fix this, all lists of instances are now an array.