Consider this JSON formatted string:
json_string = '{"SYM": ["this_string","this_string","this_string"],"DATE": ["NaN","NaN","NaN"],"YEST": ["NaN","NaN","NaN"],"other_DATE": ["NaN","NaN","NaN"],"SIZE": ["NaN","NaN","NaN"],"ACTIVITY": ["2019-09-27 14:18:28.000700 UTC","2019-09-27 14:18:28.000700 UTC","2019-09-27 14:18:28.000600 UTC"]}'
I can import it to numpy.recarray doing these operations:
result = ast.literal_eval(json_string)
names = list(result.keys())
formats = ['O'] * len(names)
dtype = dict(names = names, formats=formats)
array = numpy.array(result.items(), dtype=dtype)
This seems a lot of hops. Is there a faster way?