jsown
jsown copied to clipboard
carriage return character causes json misparse
Hello,
A literal ^M character in a string will cause jsown to misparse numbers.
In the code below I wrote ^M as explicitly two characters where you could see it, otherwise the github markup system interpreted it as a carriage return.
CL-USER> (jsown:val-safe (jsown:parse "{ \"weights\" : [ 0.5, 0.5^M ] }") "weights")
(1/2 1/20)
I worked around it by stripping all \r and \n characters from my strings before parsing them, but I figured you'd want to know.
Thank you.