spray / spray-json

A lightweight, clean and simple JSON implementation in Scala
Apache License 2.0
972 stars 190 forks source link

jsonp fails on \u2028 and \2029 #194

Open ericjohnston1989 opened 8 years ago

ericjohnston1989 commented 8 years ago

When returning a jsonp object, these special characters need to be escaped since json is not a subset of javascript. Please see:

http://timelessrepo.com/json-isnt-a-javascript-subset

ancane commented 7 years ago

Hi @ericjohnston1989. You are right, json isn't subset of javascript. Then, why spray-json (not spray-javascript :) ) should handle JS specifics? I guess, this issue should be addressed by spray akka-http, using which you'd send jsonp responses. Thanks.