I'm experiencing a weird issue. Consider a dataset defined like this:
dataset = Dataset[{<|"a" -> 1, "b" -> 2|>, <|"a" -> 3, "b" -> 4|>}];
Now I would expect Export["test.json", dataset] to create a JSON file with these contents:
[{"a": 1, "b": 2}, {"a": 3, "b": 4}].
Instead, the command returns
Export::badval: The element Data contains invalid values. >>.
A workaround is to run
Export["test.json", Normal[Normal[dataset]]]
but that seems merely a workaround. Is there anyone here who knows a neat solution?
Comments
Post a Comment