Use JSON rather than ugly string split