0

My Drupal 7 is adding the character ' at the begining of JSON output (Generated by Service Module, rest server) and this is fail when eval with https://jsonlint.com

The sample url, to recreate this issue can be: http://####/api/node/20430

This problem affect when I try to consume this output in developing app Fail also.

Any help please...

SoportePRO
  • 13
  • 5

1 Answers1

0

I have checked your link. The problem is not with ' character.

When you check your json string in firebug you can see a special character "&#65279" in your json output at the beginning of your json output.

You can refer Why is  appearing in my HTML?

The first answer will fix your problem.

Viswanath Polaki
  • 1,357
  • 1
  • 10
  • 19
  • 1
    Thanks your for your help, I use this to search and remove (use carefully): You can use grep to find them and Perl to strip them out like so: $ grep -rl $'\xEF\xBB\xBF' . | xargs perl -i -pe 's{\xEF\xBB\xBF}{}' from: https://stackoverflow.com/questions/204765/elegant-way-to-search-for-utf-8-files-with-bom – SoportePRO Sep 14 '17 at 14:53