Fault-tolerant HAL+JSON parser and writer