Take options for to_json

Fixes an error where to_json was being called with options. Also missed a space.