Use type to construct stringifyJSON's note

I saw this while coding the stomp transport, I know it is a small thing but I think is worth it to "fix it".