-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Json parsing error with tc/dataset :parser-fn option #157
Comments
Thanks for the report. Can you tell me which JVM you are using and if there is a stacktrace, please attach it. |
Looks like it's a tech.ml.dataset error: (spit "test.json" "[
{\"test\": 1, \"time-period\": \"2024-06-20\"},
{\"test\": 2, \"time-period\": \"2024-06-21\"},
{\"test\": 3, \"time-period\": \"2024-06-22\"}]")
(tc/dataset "test.json" {:key-fn keyword :parser-fn {:time-period :local-date}})
|
Yes, seemed like that could be the case. I stepped through the execution but didn't quite fully get how it comes together. New to Tablecloth and the overall TMD ecoystem.
|
No worries. Addressed the problem already. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
:parser-fn
option works as expected when parsing Clojure data structure:However it returns error if same data is read from .json:
Separate tc/convert-types call using same parser-fn params however works:
Using:
The text was updated successfully, but these errors were encountered: