trim json data before decoding (fixes cgminer)