Fix #403, add test for JSON