Add json formatting, fix up option[real] parsing, more tests