Add length argument to json_parse (allows parsing non-null terminated buffers)