0

I am trying to convert a JSON object to JavaScript object. JSON object i received from webservice contain java object

{
 gateway:com.admin.mypackage.addreesoftheobject;
}

JSON.parse in JavaScript, failed to parse this field, throwing exception, invalid character 'c'

is there any other way of parsing my JavaScript object.

Thanks and Regards Biswarup

1 Answers1

0

The problem is it's incorrect JSON. You can use validators for checking:

jsonlint

jsonformatter

if you change your JSON to :

{
   "gateway":"com.admin.mypackage.addreesoftheobject;"
}

it should be parsed correctly.

Vladislav Kysliy
  • 3,488
  • 3
  • 32
  • 44