im working in NFC reader that accept a json string
when i post the json string thru input text it is accepted:
socket.emit('pushTagInfo', $('#m').val());
but when i try to assign it to variable and send it like this:
var jsonform = '{ "patientId": "1111111111111111112\n", "timestamp": "Fri Sep 11 01:18:54 2015\n", "name": "Patient Name\n", "tel": "01*-*******\n", "center": "Center 1\n", "blood": "Blood Group\n", "infection": "none\n" }';
socket.emit('pushTagInfo', jsonform);
the error is: [SyntaxError: Unexpected token]
what do u think is the problem?
thanks