Title: Fatal error, syntax help
Last modified: August 22, 2016

---

# Fatal error, syntax help

 *  Resolved [maddmedia](https://wordpress.org/support/users/maddmedia/)
 * (@maddmedia)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-syntax-help/)
 * Hi,
 * I’m hoping this plugin is what I’m looking for, however I seem to be doing something
   wrong. I keep getting the following error:
 * Fatal error: Cannot use object of type WP_Error as array in C:\wamp\www\website\
   wp-content\plugins\json-content-importer\class-json-content-importer.php on line
   153
 * my data is as below:
 * [
    { “Id”: “aa27041d-3ea6-e411-a371-005056aa1796”, “Title”: “Testing 16-02-15”,“
   StartDate”: “2015-02-16T09:00:00Z”, “EndDate”: “2015-02-16T16:00:00Z”, “MaxRegistrations”:
   20, “RegistrationCount”: 12, “Url”: “[https://mywebsite.com/event-information/?Id=aa27041d-3ea6-e411-a371-005056aa1796&mon=2&yr=2015&#8221](https://mywebsite.com/event-information/?Id=aa27041d-3ea6-e411-a371-005056aa1796&mon=2&yr=2015&#8221);},{“
   Id”: “23eb0781-3ea6-e411-a371-005056aa1796”, “Title”: “Test 16-02-15”, “StartDate”:“
   2015-02-16T09:00:00Z”, “EndDate”: “2015-02-16T16:00:00Z”, “MaxRegistrations”:
   15, “RegistrationCount”: 12, “Url”: “[https://mywebsite.com/event-information/?Id=23eb0781-3ea6-e411-a371-005056aa1796&mon=2&yr=2015&#8221](https://mywebsite.com/event-information/?Id=23eb0781-3ea6-e411-a371-005056aa1796&mon=2&yr=2015&#8221);},]
 * I have tried many ways of using the shortcode:
 * [jsoncontentimporter url=”[http://trainingapi.ghtechnical.com/Api/CourseDetails/&#8221](http://trainingapi.ghtechnical.com/Api/CourseDetails/&#8221);
   numberofdisplayeditems=”30″ basenode=”CourseDetails”]
    - {EndDate}
 * but still get th same errore.
 * Can you please advise?
 * Many thanks!
 * [https://wordpress.org/plugins/json-content-importer/](https://wordpress.org/plugins/json-content-importer/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [berkux](https://wordpress.org/support/users/berkux/)
 * (@berkux)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-syntax-help/#post-5784933)
 * Hi,
 * thanks for posting.
 * 1. XML not JSON:
    [http://trainingapi.ghtechnical.com/Api/CourseDetails/](http://trainingapi.ghtechnical.com/Api/CourseDetails/)
   is XML not JSON. So this can’T work
 * 2. JSON you posted:
    There is a trailing “,” almost at the end: This also makes
   the JSON unreadable for the Plugin (there is no “cleaning” of the JSON-Input…)
 * 3. JSON:
    [ { “Id”: “aa27041d-3ea6-e411-a371-005056aa1796”, “Title”: “Testing
   16-02-15”, “StartDate”: “2015-02-16T09:00:00Z”, “EndDate”: “2015-02-16T16:00:
   00Z”, “MaxRegistrations”: 20, “RegistrationCount”: 12, “Url”: “[https://mywebsite.com/event-information/?Id=aa27041d-3ea6-e411-a371-005056aa1796&mon=2&yr=2015&#8221](https://mywebsite.com/event-information/?Id=aa27041d-3ea6-e411-a371-005056aa1796&mon=2&yr=2015&#8221);},{“
   Id”: “23eb0781-3ea6-e411-a371-005056aa1796”, “Title”: “Test 16-02-15”, “StartDate”:“
   2015-02-16T09:00:00Z”, “EndDate”: “2015-02-16T16:00:00Z”, “MaxRegistrations”:
   15, “RegistrationCount”: 12, “Url”: “[https://mywebsite.com/event-information/?Id=23eb0781-3ea6-e411-a371-005056aa1796&mon=2&yr=2015&#8221](https://mywebsite.com/event-information/?Id=23eb0781-3ea6-e411-a371-005056aa1796&mon=2&yr=2015&#8221);}]
 * try:
    [jsoncontentimporter url=”link to JSON above”]{Title} {Url}[/jsoncontentimporter]

Viewing 1 replies (of 1 total)

The topic ‘Fatal error, syntax help’ is closed to new replies.

 * ![](https://ps.w.org/json-content-importer/assets/icon-256x256.png?rev=3464653)
 * [Get Use APIs - JSON Content Importer](https://wordpress.org/plugins/json-content-importer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/json-content-importer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/json-content-importer/)
 * [Active Topics](https://wordpress.org/support/plugin/json-content-importer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/json-content-importer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/json-content-importer/reviews/)

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)
 * [json](https://wordpress.org/support/topic-tag/json/)

 * 1 reply
 * 2 participants
 * Last reply from: [berkux](https://wordpress.org/support/users/berkux/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-syntax-help/#post-5784933)
 * Status: resolved