Title: JSON parse error
Last modified: August 22, 2016

---

# JSON parse error

 *  Resolved [tytho](https://wordpress.org/support/users/tytho/)
 * (@tytho)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/json-parse-error-2/)
 * I’m trying to use your plugin, but the front-end stuff won’t work due to a JSON
   parsing error.
 * On line 109 of `assets/js/frontend.js` you have the following:
 * `var useCustomStarImages = jQuery.parseJSON(mr_frontend_data.use_custom_star_images);`
 * The `mr_frontend_data.use_custom_star_images` is an empty string, and it throws
   a very useless error `Unexpected end of input`.
 * The reason it gets an empty string is because on line 437 of `multi-rating.php`,
   you’re getting the setting with `'use_custom_star_images' => $style_settings[
   Multi_Rating::USE_CUSTOM_STAR_IMAGES]`
 * If you switch it to `'use_custom_star_images' => $style_settings[Multi_Rating::
   USE_CUSTOM_STAR_IMAGES] ? 'true' : 'false'` so that it actually outputs ‘true’
   or ‘false’, then the JSON parsing stuff won’t break.
 * [https://wordpress.org/plugins/multi-rating/](https://wordpress.org/plugins/multi-rating/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [dpowney](https://wordpress.org/support/users/dpowney/)
 * (@dpowney)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/json-parse-error-2/#post-5760489)
 * Hi Tytho,
 * Thanks for pointing this out. Will be available in next version.
 * Thanks,
    Daniel
 *  Plugin Author [dpowney](https://wordpress.org/support/users/dpowney/)
 * (@dpowney)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/json-parse-error-2/#post-5760557)
 * This is available in version 4.0 available now. Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘JSON parse error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/multi-rating_d6dfe6.svg)
 * [Multi Rating](https://wordpress.org/plugins/multi-rating/)
 * [Support Threads](https://wordpress.org/support/plugin/multi-rating/)
 * [Active Topics](https://wordpress.org/support/plugin/multi-rating/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/multi-rating/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/multi-rating/reviews/)

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [dpowney](https://wordpress.org/support/users/dpowney/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/json-parse-error-2/#post-5760557)
 * Status: resolved