Skip to content

clj->js into firebase, then js->clj out is not the same #26

@Folcon

Description

@Folcon

@flyboarder, been working with this for a bit now and it's going pretty well!

I have noticed an odd issue, it seems that I get different values sending data into the firebase db vs pulling data out.

data goes in:

#js {:items #js {:1 #js {:id 1, :date 1489930651500}, :2 #js {:id 2, :date 1489930651652}}}

data comes out:

{items [nil {date 1489930651500, id 1} {date 1489930651652, id 2}]}

I'm doing:

(fbdb/listen @*ref* "value" #(println (js->clj (fbsnap/val %))))

It's frustrating as the correct values appear to be being stored in firebase, but the keys in the hash-maps seem to be repeatedly dropped. It seems to be pulling out objects as arrays?

I've tried js->clj with and without keywordize-keys and it doesn't seem to make any difference.

Is this an actual bug, or am I just doing something silly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions