Fork me on GitHub
#reitit
<
2019-06-22
>
abdullahibra15:06:51

howto save reitit match record into app-db of re-frame: i have converted the record to hash map then try to save it but i have objects in the hash

abdullahibra15:06:57

i got this "Error: No reader function for tag object"

abdullahibra15:06:10

i guess i need some serialization/deserialization of objects, am i right?

abdullahibra15:06:08

also why they are saved as objects, why not as pure clojure datastructure ?

abdullahibra19:06:21

guys i have added add to local store interceptor for refreshing purpose https://github.com/aibrahim/reitit/tree/master/examples/frontend-re-frame/src/cljs/frontend_re_frame but i need to save the reitit route match object right in the localstore when i refresh i got this: Error: No reader function for tag object. that's how the db when try to save {:current-route #reitit.core.Match{:template "/sub-page1", :data {:coercion #object[reitit.coercion.spec.t_reitit$coercion$spec28334], :name :frontend-re-frame.core/sub-page1, :view #object[frontend_re_frame$core$sub_page1], :link-text "Sub page 1", :controllers [{:start #object[G__45204], :stop #object[G__45207]}]}, :result nil, :path-params {}, :path "/sub-page1", :query-params {}, :parameters {:path {}, :query {}}, :controllers [{:start #object[G__45204], :stop #object[G__45207], :reitit.frontend.controllers/identity nil}]}, :current-input-value "hello world"} the problem is #object, what is the best way to serialize and deserialize them before save and when load ?

abdullahibra19:06:32

@ikitommi can you help in this?