Set numeric precision before using json_encode(). Closes #47.
Merge branch 'dev'