Git Product home page Git Product logo

Comments (5)

bakyeono avatar bakyeono commented on June 8, 2024

;;;; test about this issue
(def before-round (sorted-map 0 "value" 1 "value"))
(def after-round (taoensso.nippy/thaw-from-bytes (taoensso.nippy/freeze-to-bytes before-round)))

(class before-round)
; ===> clojure.lang.PersistentTreeMap

(class after-round)
; ===> clojure.lang.PersistentArrayMap

(subseq before-round = 0)
; ===> ([0 "value"])

(subseq after-round = 0)
; ClassCastException clojure.lang.PersistentArrayMap cannot be cast to clojure.lang.Sorted

from nippy.

bakyeono avatar bakyeono commented on June 8, 2024

;;;; an improvised solution for users
; use this function to regain sorted-map
(defn hash-map->sorted-map [coll]
(into (sorted-map) (sort coll)))

; test
(class (hash-map->sorted-map after-round))
; ===> clojure.lang.PersistentTreeMap

from nippy.

ptaoussanis avatar ptaoussanis commented on June 8, 2024

Hi bakyeono,

Sorry for the delay replying - was travelling the past few weeks. Working through a backlog now, will try get back to you in a couple days!

from nippy.

ptaoussanis avatar ptaoussanis commented on June 8, 2024

Just pushed 1.2.0 which adds support for sorted maps and sets. Hope that helps! Cheers :-)

from nippy.

bakyeono avatar bakyeono commented on June 8, 2024

Thanks a lot! You're a great man!

from nippy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.