From 4b09b85a9417afabfd79a4da85e0f539816d8e86 Mon Sep 17 00:00:00 2001 From: Chris Nuernberger Date: Thu, 12 Sep 2024 10:30:06 -0600 Subject: [PATCH] Fixes #410 - json parsing fails if parser-fn option is provided. --- src/tech/v3/dataset/io.clj | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tech/v3/dataset/io.clj b/src/tech/v3/dataset/io.clj index abec0f9b..385db73d 100644 --- a/src/tech/v3/dataset/io.clj +++ b/src/tech/v3/dataset/io.clj @@ -62,7 +62,11 @@ (input-stream-or-reader data))] ;;Use mixed json parse profile as we don't care if the input is immutable or mutable and ;;mixed has the best performance. - (let [options (assoc options :profile :mutable)] + + (let [options (-> (assoc options :profile :mutable) + ;; the charred read-json call has another interpretation of parser-fn + ;; that is incompatible with the tmd one. + (dissoc :parser-fn))] (->> (apply charred/read-json is (apply concat (seq options))) (parse-mapseq-colmap/mapseq->dataset options)))))